Click here to Skip to main content
15,899,475 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralReturn c_str() from function Pin
elelont215-Mar-12 3:44
elelont215-Mar-12 3:44 
GeneralRe: Return c_str() from function Pin
Erudite_Eric15-Mar-12 3:55
Erudite_Eric15-Mar-12 3:55 
GeneralRe: Return c_str() from function Pin
enhzflep15-Mar-12 3:59
enhzflep15-Mar-12 3:59 
GeneralRe: Return c_str() from function Pin
CPallini15-Mar-12 4:03
mveCPallini15-Mar-12 4:03 
GeneralRe: Return c_str() from function Pin
elelont215-Mar-12 4:38
elelont215-Mar-12 4:38 
GeneralRe: Return c_str() from function Pin
CPallini15-Mar-12 8:40
mveCPallini15-Mar-12 8:40 
GeneralRe: Return c_str() from function Pin
Erudite_Eric15-Mar-12 22:11
Erudite_Eric15-Mar-12 22:11 
GeneralRe: Return c_str() from function Pin
CPallini15-Mar-12 22:24
mveCPallini15-Mar-12 22:24 
Erudite_Eric wrote:
Ever wondered why C++ can be so heavy on the stack?

Yes, I know. However the code would be correct (in may opinion correct code id much better than wrong one Roll eyes | :rolleyes: ).

Erudite_Eric wrote:
What he can do of course is pass a SS as a pinter to the func, which allocates enough storage, does its thing, and returns success or fail. Then the caller can free the storage when it has to.
Passing a reference it is usually better.


In any case, now C++ has the move semantics[^].
Veni, vidi, vici.

GeneralRe: Return c_str() from function Pin
elelont216-Mar-12 3:09
elelont216-Mar-12 3:09 
GeneralRe: Return c_str() from function Pin
CPallini16-Mar-12 3:12
mveCPallini16-Mar-12 3:12 
GeneralRe: Return c_str() from function Pin
elelont216-Mar-12 4:01
elelont216-Mar-12 4:01 
GeneralRe: Return c_str() from function Pin
CPallini16-Mar-12 4:14
mveCPallini16-Mar-12 4:14 
GeneralRe: Return c_str() from function Pin
elelont216-Mar-12 4:19
elelont216-Mar-12 4:19 
GeneralRe: Return c_str() from function Pin
CPallini16-Mar-12 4:26
mveCPallini16-Mar-12 4:26 
GeneralRe: Return c_str() from function Pin
elelont218-Mar-12 21:27
elelont218-Mar-12 21:27 
GeneralRe: Return c_str() from function Pin
CPallini19-Mar-12 3:04
mveCPallini19-Mar-12 3:04 
GeneralRe: Return c_str() from function Pin
Erudite_Eric16-Mar-12 10:13
Erudite_Eric16-Mar-12 10:13 
GeneralRe: Return c_str() from function Pin
CPallini16-Mar-12 10:37
mveCPallini16-Mar-12 10:37 
QuestionSet subitem image on virtual listview Pin
_Flaviu15-Mar-12 2:35
_Flaviu15-Mar-12 2:35 
AnswerRe: Set subitem image on virtual listview Pin
Richard MacCutchan15-Mar-12 3:23
mveRichard MacCutchan15-Mar-12 3:23 
GeneralRe: Set subitem image on virtual listview Pin
_Flaviu15-Mar-12 7:35
_Flaviu15-Mar-12 7:35 
GeneralRe: Set subitem image on virtual listview Pin
Richard MacCutchan15-Mar-12 8:24
mveRichard MacCutchan15-Mar-12 8:24 
QuestionSocket Problem Pin
john563213-Mar-12 23:51
john563213-Mar-12 23:51 
AnswerRe: Socket Problem Pin
Chandrasekharan P14-Mar-12 0:42
Chandrasekharan P14-Mar-12 0:42 
QuestionLoadLibraryW("C:\abc.dll") fails Pin
V K 213-Mar-12 23:43
V K 213-Mar-12 23:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.