Code:
int x = 2;
int* pointerone = &x;
int* pointertwo = pointerone;
So the address of pointerone
is assigned to pointertwo
, but is the copy constructor being called and the object that holds the address is copied into the address object of the other pointer, like all the default copy constructors on other types performing a shallow copy. If it is as I expect, how does the copy constructor of a pointer look like?