Hi
Using c++.
I have
.
class simpleUnit; //base unit
class advUnit: public simpleUnit; //has lots of extra data
.
Now i need to place a copy of all members from simpleUnit (the parent class) INSIDE advUnit, like so:
.
//inside declaration of advUnit
simpleUnit copiedData;
//when i need to copy it
myAdvUnit.copiedData = myAdvUnit.(parentData)
//and later when I need to "restore it"
myAdvUnit.(parentData) = myAdvUnit.copiedData;
.
I would prefer not to copy all members by hand one by one. Any way to do it?