Some concepts of Undo/Redo attempted in C++