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:
Qt Code:
  1. ClassX * the_object_undo;
  2.  
  3. void w_set_undo(CLass the_object)
  4. { the_object_undo = &the_object }
  5.  
  6. 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
Qt Code:
  1. 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.