Hello, everyone, could you make me know why operator= is not called in
this code?
Thank you.
class cls
{
public:
cls()
{
b=true;
i=100;
d=88;
}
bool b;
int i;
double d;
cls& operator= (const cls& rhs);
};
cls& cls::operator= (const cls& rhs)
{
i=rhs.i;
return * this;
}
int _tmain(int argc, _TCHAR* argv[])
{
cls a;
a.i=1000;
a.b=false;
a.d=55;
cls b=a;
return 0;
}