Hi,
I'm trying to compare between two objects of a simple class:
class A
{
int num;
}
void foo()
{
A a,b;
if (a == b)
{
... do domething
}
}
from some reason, it doesnt let me compare the objects. Am I wrong or there
should be a default operator == between the objects?
I get the error:
c:\test\t1.cpp(12) : error C2676: binary '==' : 'A' does not define this
operator or a conversion to a type acceptable to the predefined operator
why???
Help will be appreciated.
Ram.