it doesn't work for me.
i have a header file and a cpp file.
need to define a conversion operator from my class to INT, but it gives me "syntax error" when declaring it in the H file and implementing in the cpp file. maybe i got the syntax wrong?
in the H file i have in "public":
operator int();
and in the cpp file i have:
A::operator int() { return mNumber ;}
if i implement the function in the H file it works, but i don't want to do that.
can anyone help?