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

C / C++ / MFC

 
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 
GeneralRe: Basic operator overloading Pin
bkelly136-Jul-08 12:43
bkelly136-Jul-08 12:43 
RE: what it really means is a = b.operator+(c).

No, I am missing several things here.

Lets skip around a bit. First + (the plus symbol) is a binary operator as in:
int a, b, c;
a = b + c;

That means it has two arguments. To write this in the form of a function we would use the format:
result = add( y, z );

So there should be two arguments in the declaration. But when I write this in the dot h file:
CC operator+( CC &source1, CC &source2 )


The compiler says:
error C2804: binary 'operator +' has too many parameters

That seems to be in direct contradiction of the form:
a = b + c;

The addition operator has three variables, one left and two right.

As the values are being put in x, and read from y and z, it seems that the function is being run from the perspective of object x.

What am I missing?
I have another question, but lets take this one point at a time.

Thanks for your time

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 
GeneralRe: Replacement for IsBadReadPtr in Windows Vista Pin
V K 26-Jul-08 5:10
V K 26-Jul-08 5:10 

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.