Can some one please help me out....
-
hello, I am trying to compile a source code written in MFC(Microsoft Foundation Class) language. I am continuesly facing an error called C2664: cannot convert parameter 1 from 'class CRobot' to 'class CRobot *' It says also : No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called. I tryed to overload both "constructor" and "=". But it doesn´t help. I think it is simple compiler error but I´m not able to solve it. If you need to see the code please let me know and I´ll send it to you. (nounouladanoise@yahoo.fr) Thanx a lot. Inés :(( :(( :(( :(( :(( :(( :((
-
hello, I am trying to compile a source code written in MFC(Microsoft Foundation Class) language. I am continuesly facing an error called C2664: cannot convert parameter 1 from 'class CRobot' to 'class CRobot *' It says also : No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called. I tryed to overload both "constructor" and "=". But it doesn´t help. I think it is simple compiler error but I´m not able to solve it. If you need to see the code please let me know and I´ll send it to you. (nounouladanoise@yahoo.fr) Thanx a lot. Inés :(( :(( :(( :(( :(( :(( :((
The compiler is telling you it needs a pointer to an object, not an actual object. Try calling the fucntion like this:
CRobot robot;
...
SomeFunction(&robot); // pass pointer to object, not actual abjectRoger Allen Sonork 100.10016 Were you different as a kid? Did you ever say "Ooohhh, shiny red" even once? - Paul Watson 11-February-2003