Henry

Henry

  • NA
  • 1
  • 0

Simple Question: Reference vs. Value

May 29 2008 1:55 AM
So, I've got a class called Soldier, and I'm trying to create a seperate copy of it basically.  But since classes assign through reference, whenever I create a new soldier, and set it as the old one, they both point to the same instance.  I'm wondering if there's anyway to just, copy all of the values over into a new Soldier class.

Answers (2)