How to revert object to an older version.
in
Programming Questions
•
1 year ago
I don't really know how to search for this, but I have a feeling it has been answered already. I want save all the data for one object so that I can make changes to the object and then revert back to it later. Currently I have something like this, although not exactly:
void updateObject(){
pObject=object;
object.update();
}
void revertObject{
object=pObject;
}
But that doesn't work, presumably because I just don't really understand computer memory.
Also, the object in question has a lot of different variables and types of variables associated with it, if that has any impact on a solution.
1