Click here to Skip to main content
16,005,141 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: OnSize handler Pin
Blake Miller17-Aug-05 4:19
Blake Miller17-Aug-05 4:19 
GeneralRe: OnSize handler Pin
Ravi Bhavnani17-Aug-05 4:22
professionalRavi Bhavnani17-Aug-05 4:22 
GeneralRe: OnSize handler Pin
Jose Lamas Rios17-Aug-05 7:33
Jose Lamas Rios17-Aug-05 7:33 
QuestionHow to create Plug-in for Win32 based IDE. Pin
Manish Paul16-Aug-05 21:12
Manish Paul16-Aug-05 21:12 
QuestionWhat's the difference? Pin
LiYS16-Aug-05 20:55
LiYS16-Aug-05 20:55 
AnswerRe: What's the difference? Pin
toxcct16-Aug-05 22:14
toxcct16-Aug-05 22:14 
GeneralRe: What's the difference? Pin
LiYS16-Aug-05 23:26
LiYS16-Aug-05 23:26 
GeneralRe: What's the difference? Pin
Bob Stanneveld16-Aug-05 23:56
Bob Stanneveld16-Aug-05 23:56 
In the first case, the compiler creates a temporary object on the stack (in the function, object a). You return this object by value, so the compiler creates another temporary object on the stack (the return value) and then calls the copy constructor to copy object a into the temporary object. Than, object a gets destroyed and after finishing the statement, the temporary return value gets destroyed also.

In the second case, you introduce no temoray variable in the function itself. You call the contructor to return the value. In this case, the destructor of the returned temporary variable is called.

Behind every great black man...
            ... is the police. - Conspiracy brother


Blog[^]
GeneralRe: What's the difference? Pin
toxcct17-Aug-05 0:10
toxcct17-Aug-05 0:10 
GeneralRe: What's the difference? Pin
toxcct17-Aug-05 0:16
toxcct17-Aug-05 0:16 
AnswerRe: What's the difference? Pin
guypremont17-Aug-05 3:34
guypremont17-Aug-05 3:34 
AnswerRe: What's the difference? Pin
TheGreatAndPowerfulOz17-Aug-05 14:02
TheGreatAndPowerfulOz17-Aug-05 14:02 
GeneralTest Pin
Anonymous16-Aug-05 19:08
Anonymous16-Aug-05 19:08 
GeneralRe: Test Pin
Anonymous16-Aug-05 19:08
Anonymous16-Aug-05 19:08 
GeneralRe: Test Pin
ThatsAlok16-Aug-05 19:43
ThatsAlok16-Aug-05 19:43 
GeneralRe: Test Pin
Christian Graus16-Aug-05 19:31
protectorChristian Graus16-Aug-05 19:31 
GeneralRe: Test Pin
Eytukan16-Aug-05 22:44
Eytukan16-Aug-05 22:44 
Questiondisplay int in textbox?? Pin
gr8coaster32916-Aug-05 18:27
gr8coaster32916-Aug-05 18:27 
AnswerRe: display int in textbox?? Pin
Christian Graus16-Aug-05 18:51
protectorChristian Graus16-Aug-05 18:51 
GeneralRe: display int in textbox?? Pin
gr8coaster32916-Aug-05 19:34
gr8coaster32916-Aug-05 19:34 
GeneralRe: display int in textbox?? Pin
Christian Graus16-Aug-05 19:42
protectorChristian Graus16-Aug-05 19:42 
GeneralRe: display int in textbox?? Pin
gr8coaster32917-Aug-05 5:50
gr8coaster32917-Aug-05 5:50 
GeneralRe: display int in textbox?? Pin
Christian Graus17-Aug-05 11:50
protectorChristian Graus17-Aug-05 11:50 
GeneralRe: display int in textbox?? Pin
Jose Lamas Rios17-Aug-05 7:40
Jose Lamas Rios17-Aug-05 7:40 
GeneralRe: display int in textbox?? Pin
gr8coaster32917-Aug-05 8:12
gr8coaster32917-Aug-05 8:12 

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.