C++ pointers and constructors
- by lego69
if I have this snippet of the code
A a1(i);
A a2 = a1;
A *pa1 = new A(a2);
can somebody please explain what exactly the last line does, it makes copy of the a2 and pointer for this new object is pa1 or it just creates pointer for a2, thanks in advance