Cloning (programming): Difference between revisions

Content deleted Content added
Line 45:
<source lang="cpp">
Object * original = new Object;
Object * copy = NULLnullptr;
 
copy = new Object(* original); // creates a copy of original and assigns its address to copy