Click here to Skip to main content
15,907,001 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Basic operator overloading Pin
Saurabh.Garg6-Jul-08 8:36
Saurabh.Garg6-Jul-08 8:36 
GeneralRe: Basic operator overloading Pin
bkelly136-Jul-08 12:43
bkelly136-Jul-08 12:43 
GeneralRe: Basic operator overloading Pin
Bram van Kampen6-Jul-08 13:11
Bram van Kampen6-Jul-08 13:11 
GeneralRe: Basic operator overloading Pin
bkelly136-Jul-08 16:01
bkelly136-Jul-08 16:01 
GeneralRe: Basic operator overloading Pin
Saurabh.Garg6-Jul-08 17:51
Saurabh.Garg6-Jul-08 17:51 
GeneralRe: Basic operator overloading Pin
Saurabh.Garg6-Jul-08 18:05
Saurabh.Garg6-Jul-08 18:05 
AnswerRe: Basic operator overloading [modified] Pin
Luc Pattyn6-Jul-08 10:03
sitebuilderLuc Pattyn6-Jul-08 10:03 
GeneralRe: Basic operator overloading Pin
Graham Shanks6-Jul-08 10:37
Graham Shanks6-Jul-08 10:37 
Luc Pattyn wrote:
CC result= *this;
does not create anything; it declares a reference called result to a type CC and sets it equal
to *this, so now result and this are one and the same object.


Sorry, that statement is not correct.

CC result= *this;


creates an object of type CC and assigns the contents of the current object to it. To create a reference you would use CC& result = *this;

Actually the above code probably does not use the assigment operator, it may well use the copy constructor (the compiler is allowed to treat declaration and assignment in one statement as copy construction rather than default construction followed by assignment).

Graham

Librarians rule, Ook!

GeneralRe: Basic operator overloading Pin
Luc Pattyn6-Jul-08 11:15
sitebuilderLuc Pattyn6-Jul-08 11:15 
AnswerRe: Basic operator overloading Pin
Dan6-Jul-08 12:54
Dan6-Jul-08 12:54 
GeneralRe: Basic operator overloading Pin
bkelly136-Jul-08 16:03
bkelly136-Jul-08 16:03 
QuestionHow to perform structured exception handling in Windows Vista Pin
V K 26-Jul-08 5:09
V K 26-Jul-08 5:09 
AnswerRe: How to perform structured exception handling in Windows Vista Pin
Stephen Hewitt6-Jul-08 15:37
Stephen Hewitt6-Jul-08 15:37 
GeneralRe: How to perform structured exception handling in Windows Vista Pin
V K 26-Jul-08 17:49
V K 26-Jul-08 17:49 
GeneralRe: How to perform structured exception handling in Windows Vista Pin
Saurabh.Garg6-Jul-08 18:08
Saurabh.Garg6-Jul-08 18:08 
GeneralRe: How to perform structured exception handling in Windows Vista Pin
Stephen Hewitt6-Jul-08 18:28
Stephen Hewitt6-Jul-08 18:28 
QuestionReplacement for IsBadReadPtr in Windows Vista Pin
V K 26-Jul-08 4:46
V K 26-Jul-08 4:46 
AnswerRe: Replacement for IsBadReadPtr in Windows Vista Pin
CPallini6-Jul-08 5:02
mveCPallini6-Jul-08 5:02 
GeneralRe: Replacement for IsBadReadPtr in Windows Vista Pin
V K 26-Jul-08 5:10
V K 26-Jul-08 5:10 
GeneralRe: Replacement for IsBadReadPtr in Windows Vista Pin
CPallini6-Jul-08 5:22
mveCPallini6-Jul-08 5:22 
GeneralRe: Replacement for IsBadReadPtr in Windows Vista Pin
Luc Pattyn6-Jul-08 11:35
sitebuilderLuc Pattyn6-Jul-08 11:35 
GeneralRe: Replacement for IsBadReadPtr in Windows Vista Pin
CPallini6-Jul-08 21:14
mveCPallini6-Jul-08 21:14 
AnswerRe: Replacement for IsBadReadPtr in Windows Vista Pin
Bram van Kampen6-Jul-08 13:24
Bram van Kampen6-Jul-08 13:24 
AnswerRe: Replacement for IsBadReadPtr in Windows Vista Pin
Stephen Hewitt6-Jul-08 15:53
Stephen Hewitt6-Jul-08 15:53 
QuestionDomain Controller SID in WMI Pin
Green Fuze6-Jul-08 1:32
Green Fuze6-Jul-08 1:32 

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.