I dont know if this can be done.-
I have a method to set a copy of an object (with some structs instances an vectors inside it)
Inside the class I have to do the work, I have a private pointer based object_undo:
ClassX * the_object_undo;
void w_set_undo(CLass the_object)
{ the_object_undo = &the_object }
ClassX * w_get_undo(){ return the_object_undo}
ClassX * the_object_undo;
void w_set_undo(CLass the_object)
{ the_object_undo = &the_object }
ClassX * w_get_undo(){ return the_object_undo}
To copy to clipboard, switch view to plain text mode
I have a original_object pointer based in another class.
I call
w_set_undo(*original_object);
w_set_undo(*original_object);
To copy to clipboard, switch view to plain text mode
Ok, Inside w_set_undo, if I check some properties of 'the_object_undo' they are correct. However, inside w_get_undo, they are not ( so I cant to retunr a wrong object). What is happen ? A solution ?
Thanks.
Bookmarks