Click here to Skip to main content
15,911,132 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: best arrange tiny pic in big pic Pin
David Crow6-Jul-08 10:31
David Crow6-Jul-08 10:31 
GeneralRe: best arrange tiny pic in big pic Pin
rahzani6-Jul-08 11:16
rahzani6-Jul-08 11:16 
GeneralRe: best arrange tiny pic in big pic Pin
Bram van Kampen6-Jul-08 11:42
Bram van Kampen6-Jul-08 11:42 
AnswerRe:arrange pic1 into pic2 Pin
rahzani6-Jul-08 11:19
rahzani6-Jul-08 11:19 
GeneralRe:arrange pic1 into pic2 Pin
Stephen Hewitt6-Jul-08 15:21
Stephen Hewitt6-Jul-08 15:21 
GeneralRe: best arrange tiny pic in big pic Pin
Stephen Hewitt6-Jul-08 16:37
Stephen Hewitt6-Jul-08 16:37 
QuestionBasic operator overloading Pin
bkelly136-Jul-08 8:21
bkelly136-Jul-08 8:21 
AnswerRe: Basic operator overloading Pin
Saurabh.Garg6-Jul-08 8:36
Saurabh.Garg6-Jul-08 8:36 
In a class Constructor, Copy Constructor and assignment operator are automatically generated by compiler if needed.

First and most important is the definition of operator. You should understand that operator is nothing by a function. So for CC class if you write a = b + c, where a, b, and c are objects of type CC, what it really means is a = b.operator+(c). Does this makes sense?

Another this is there is no need to use functions to access variables within the class. You can do this as:

CC CC::operator+(CC &source)
{
    CC result = *this;
    
    result.X += source.X;
    result.Y += source.Y;
    result.Z += source.Z;
    
    return result;
}


Hope this helps.
-Saurabh
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 
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 

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.