Timeline for Directly write into char* buffer of std::string
Current License: CC BY-SA 3.0
Post Revisions
12 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 3, 2022 at 6:01 | comment | added | Gabriel Staples |
See also: How to convert a std::string to const char* or char*
|
|
| May 7, 2022 at 13:36 | answer | added | mo FEAR | timeline score: 0 | |
| Sep 4, 2016 at 6:17 | vote | accept | CommunityBot | ||
| Aug 29, 2016 at 8:13 | history | edited | user3624760 | CC BY-SA 3.0 |
deleted 277 characters in body
|
| Aug 29, 2016 at 7:49 | comment | added | user3624760 |
@ildjam It looks like I totally misread that paper. .data() should just work.
|
|
| Aug 29, 2016 at 7:48 | history | edited | user3624760 | CC BY-SA 3.0 |
added 82 characters in body
|
| Aug 29, 2016 at 7:47 | comment | added | Garf365 |
before accessing to &std[0] &str.font(), ... be sure to have memory, ie that str.size() > 0. If you just have instantiate str, use str.resize()
|
|
| Aug 29, 2016 at 7:39 | answer | added | Israel Unterman | timeline score: 0 | |
| Aug 29, 2016 at 7:38 | comment | added | ildjarn |
"C++17 added added non-const data() to std::string but it still says that you can't modify the buffer." Huh? Where does it say that?
|
|
| Aug 29, 2016 at 7:37 | answer | added | Cheers and hth. - Alf | timeline score: 3 | |
| S Aug 29, 2016 at 7:26 | answer | added | user3624760 | timeline score: 26 | |
| S Aug 29, 2016 at 7:26 | history | asked | user3624760 | CC BY-SA 3.0 |