Hi All,
In my VC++ Application, I have been unable to resolve the following code snippet (similar),....
Class B : public A
{
public:
bool f1();
bool f2();
UINT8* rawmem;
};
B objb;
bool B::f1()
{
rawmem = (UINT8*) new [200];
return true;
}
bool B::f2()
{
ECODE ec;
...
if(ec = (objb.rawmem) != EC_NO_ERR) {
SaveToLog(ERR_MSG, " Objb creation failed 0x%x",ec);
return false;
}
....
return true;
}
On build of above code: I am getting C2679: error which states >> binary '!=' : no operator found which takes a right-hand operand of type ECODE(or there is no acceptable conversion).
I suspect the error highlighted above is either because of want of operator overloading (!=) OR mismatch in parenthesis for the said line. I need some help in resolving the above error.(without resorting to reinterpret_cast)
Thanks in Advance...
With Regards,
Vishalk_91