P
pvinodhkumar
class A
{
A();
A& operator = (const A& aObject_in);
int x;
int y;
};
A::A()
{
x = 0;
y = 0;
}
A& A:perator=(const A& aObject_in)
{
if(this != &aObject_in)
{
x = aObject_in.x;
y = aObject_in.y;
}
return *this; // A temporary created here?
}
int main()
{
A a1;
A a2;
a2 = a1;
}
{
A();
A& operator = (const A& aObject_in);
int x;
int y;
};
A::A()
{
x = 0;
y = 0;
}
A& A:perator=(const A& aObject_in)
{
if(this != &aObject_in)
{
x = aObject_in.x;
y = aObject_in.y;
}
return *this; // A temporary created here?
}
int main()
{
A a1;
A a2;
a2 = a1;
}