Timeline for Create a C style char** from a C++ vector<string>
Current License: CC BY-SA 4.0
21 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Oct 18, 2018 at 3:01 | history | tweeted | twitter.com/StackCodeReview/status/1052756589235630080 | ||
Oct 17, 2018 at 3:05 | review | Close votes | |||
Oct 17, 2018 at 6:11 | |||||
Oct 14, 2018 at 12:58 | comment | added | gnasher729 | Your second statement overwrites unallocated memory already. | |
Oct 13, 2018 at 4:11 | comment | added | mathreadler | This is quite c-like. If strings are 0 terminated I would think Useless has simplest solution. Just store pointer to start of each string as char*. Typically what c_str() would return. | |
Oct 12, 2018 at 8:20 | comment | added | Jack Aidley |
What is the lifespan of the char** you pass? Do the pointers need to remain valid throughout, or can they be discarded after the call?
|
|
Oct 12, 2018 at 2:44 | review | Suggested edits | |||
Oct 12, 2018 at 3:53 | |||||
Oct 10, 2018 at 21:04 | answer | added | tmlen | timeline score: 2 | |
Oct 10, 2018 at 17:13 | comment | added | cmh |
Perhaps it makes more sense create an execve wrapper (that takes vector<string> ) rather than trying to maintain a parallel vector<string>
|
|
Oct 10, 2018 at 15:02 | answer | added | Useless | timeline score: 30 | |
Oct 10, 2018 at 9:04 | comment | added | TafT | Could you tell us the version of C++ standard you want to stick to please? It can vary the interface and prefered code style a lot. For C there has not been as large of a chance in standards in the last decade. C++11 is quite different to before, C++14 is a significant change again (C++17 not so dramatic IMHO). | |
Oct 10, 2018 at 8:21 | comment | added | Konrad Rudolph |
Can you explain why del_strlist returns a boolean? What is the result used for?
|
|
Oct 10, 2018 at 8:10 | answer | added | Toby Speight | timeline score: 11 | |
Oct 10, 2018 at 6:38 | answer | added | jvb | timeline score: 6 | |
Oct 10, 2018 at 5:51 | answer | added | Incomputable | timeline score: 14 | |
Oct 10, 2018 at 5:05 | review | Close votes | |||
Oct 11, 2018 at 6:58 | |||||
Oct 10, 2018 at 4:58 | answer | added | muru | timeline score: 18 | |
S Oct 10, 2018 at 4:47 | history | edited | Stephen Rauch | CC BY-SA 4.0 |
Cleaned up the question and added some formatting.
|
S Oct 10, 2018 at 4:47 | history | suggested | Ned Flanders | CC BY-SA 4.0 |
Cleaned up the question and added some formatting.
|
Oct 10, 2018 at 4:46 | review | Suggested edits | |||
S Oct 10, 2018 at 4:47 | |||||
Oct 10, 2018 at 3:15 | review | First posts | |||
Oct 10, 2018 at 3:21 | |||||
Oct 10, 2018 at 3:12 | history | asked | wrosecrans | CC BY-SA 4.0 |