Click here to Skip to main content
15,888,984 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralThanks, but... Pin
Robert Mao25-Jun-03 5:05
Robert Mao25-Jun-03 5:05 
GeneralRe: Thanks, but... Pin
Boris Schuetz25-Jun-03 5:37
Boris Schuetz25-Jun-03 5:37 
Generalany alternate way Pin
Halid Niyaz27-Aug-03 2:00
Halid Niyaz27-Aug-03 2:00 
Generaltricky thing with string Pin
Ilia Oussorov25-Jun-03 3:13
Ilia Oussorov25-Jun-03 3:13 
GeneralRe: tricky thing with string Pin
David Crow25-Jun-03 3:27
David Crow25-Jun-03 3:27 
GeneralRe: tricky thing with string Pin
Ilia Oussorov25-Jun-03 3:33
Ilia Oussorov25-Jun-03 3:33 
GeneralRe: tricky thing with string Pin
David Crow25-Jun-03 3:36
David Crow25-Jun-03 3:36 
GeneralRe: tricky thing with string Pin
Ilia Oussorov25-Jun-03 3:46
Ilia Oussorov25-Jun-03 3:46 
Sorry, I have to explain it more exact.

a oa( ((string)"aaa"+(string)"bbb").c_str());

above line passes the pointer on temporary object ( of type const char*) to the constructor. After the end of constructor this object (character seq"aaabbb") should lose validity as you wrote.
But next line oa.print() prints correct object. Is it only a luck, that the memory was not overwritten or temporary object still exists?
If you mean this is a luck, I would very appreciate the suggestion how to demonstrate this

GeneralRe: tricky thing with string Pin
David Crow25-Jun-03 4:15
David Crow25-Jun-03 4:15 
GeneralRTX Program Pin
dadacncn25-Jun-03 3:10
dadacncn25-Jun-03 3:10 
GeneralCursor Position Pin
SatyaDY25-Jun-03 1:37
SatyaDY25-Jun-03 1:37 
GeneralRe: Cursor Position Pin
basementman25-Jun-03 4:22
basementman25-Jun-03 4:22 
GeneralRe: Cursor Position Pin
SatyaDY25-Jun-03 18:16
SatyaDY25-Jun-03 18:16 
Questionhow to detect the internet/network connect Pin
Tarundeep Singh Kalra25-Jun-03 1:05
Tarundeep Singh Kalra25-Jun-03 1:05 
AnswerRe: how to detect the internet/network connect Pin
David Crow25-Jun-03 2:52
David Crow25-Jun-03 2:52 
GeneralFile Read/Write Pin
chito25-Jun-03 0:55
chito25-Jun-03 0:55 
GeneralRe: File Read/Write Pin
Anonymous25-Jun-03 2:34
Anonymous25-Jun-03 2:34 
GeneralRe: File Read/Write Pin
valikac25-Jun-03 6:16
valikac25-Jun-03 6:16 
Generalanother quesion about regular dll Pin
gucy25-Jun-03 0:19
gucy25-Jun-03 0:19 
GeneralRe: another quesion about regular dll Pin
David Crow25-Jun-03 2:58
David Crow25-Jun-03 2:58 
GeneralGet your software done or undertake projects Pin
Anonymous24-Jun-03 23:53
Anonymous24-Jun-03 23:53 
GeneralRe: Get your software done or undertake projects Pin
Duncan Edwards Jones24-Jun-03 23:59
professionalDuncan Edwards Jones24-Jun-03 23:59 
GeneralRe: Get your software done or undertake projects Pin
Ryan Binns25-Jun-03 0:03
Ryan Binns25-Jun-03 0:03 
GeneralRe: Get your software done or undertake projects Pin
Neville Franks25-Jun-03 0:20
Neville Franks25-Jun-03 0:20 
QuestionHow to get WHOIS information in my app? Pin
wangdave24-Jun-03 23:48
wangdave24-Jun-03 23:48 

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.