0
0infinity0
Why wont the operator work
#include <iostream.h>
class A
{
public:
A * operator = (A * rhs)
{
cout << "Ptr cpy" << endl;
return this;
}
private:
};
main()
{
A *a1;
A* a2 = new A();
a1 = a2;
}
#include <iostream.h>
class A
{
public:
A * operator = (A * rhs)
{
cout << "Ptr cpy" << endl;
return this;
}
private:
};
main()
{
A *a1;
A* a2 = new A();
a1 = a2;
}