Why is my copy constructor not working with new invocation and has same memory address? <p>Am i able to use a copy constructor with the new keyword? My code also shows the 2 obj pointers have the same memory address? </p> <pre><code>#include &lt;iostream&gt; using namespace std; class Person{ public: int age; Person() { } Person(const Person&amp; p ) : age(p.age) { } }; int main() { Person *p = new Person(); p-&gt;age = 15; Person *y = p; // Person *z = new Person(p); why no work??? // p and y have the same memory addres?? std::cout &lt;&lt; p; std::cout &lt;&lt; y; return 0; } </code></pre>