I have this class:
class A {
private:
int player;
public:
A(int initPlayer = 0);
A(const A&);
A& operator=(const A&);
~A();
void foo() const;
};
and I have a function that contains the following line:
A *pa1 = new A(a2);
can someone explain what exactly happens when I call the A(a2)compiler calls the constructor or copy constructor, thanks in advance
source
share