What's the simplest way to make an exact copy of an existing object?
If p is an object of type Person, how do I make q an object of type person with all the same values, but independent (so that changing p\x doesn't change q\x)?
Or is the fastest way q\x = p\x, q\y = p\y etc?
Cheers.
If p is an object of type Person, how do I make q an object of type person with all the same values, but independent (so that changing p\x doesn't change q\x)?
Or is the fastest way q\x = p\x, q\y = p\y etc?
Cheers.