Hello all....
ive been learning C++ from an old text book,, copyrighted 1995,,,
It's made for borland C++ V4.5
and turbo C++
however i have found the language to be an exact match to VC++ version 6.0 (what im using)
HOWEVER... i have been learing how to use overloaded operators,
the binary ones are great, they work fine,,,,
these are the ones u would use to make the following arithmatic valid
Class3 = Class1 & class2;
// the code is sumthing like Class operator & (class myClass) { code returnung type class; }
But my book also tells me it is possible to do "Unary" operators,
Eg,,, int N=0 ; N++ is an examplt of this,, ( an over loaded operator with NO parameters....
however when i try to implement this the compiler complains
The Book tells me to do it like so
void operator ++ () { code altering the class, but returning nothing ; }
// ERROR : Too Few parameters.
Can some1 tell me if the syntax for this function has changed over the last 5 or so years, and if so whta is the VC++ way of doing it,,
or has this usefull function been removed from microsofts compiler ??
thanX to any1 who could help...
ALSO, if any1 knows the aproxamate age of borland 4.5 it would help,,, ( i belive it was a DOS program )
thanX again.
Enter your message below
Sign in or Join us (it's free).