Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualRobot Ninja

Posted 15 December 2012 - 04:48 PM

If you want to return a copy of the data deleted after deleting a node, overload the DeleteNode function (or use a different name) with one that takes a reference to a node type, and copy the data into the provided reference, then do the deletion.

I could do that, but the Delete function in my list class gets called by the Delete function in my hash table class (also designed to return the data). The data would still need to be copied from that level, unless I also made another similar Delete function in my hash table as well. It seems a little wacky to me to do that though...

#1Robot Ninja

Posted 15 December 2012 - 04:48 PM

If you want to return a copy of the data deleted after deleting a node, overload the DeleteNode function (or use a different name) with one that takes a reference to a node type, and copy the data into the provided reference, then do the deletion.

I could do that, but the Delete function in my list class gets called by the Delete function in my hash table class. The data would still need to be copied from that level, unless I also made another similar Delete function in my hash table as well. It seems a little wacky to me to do that though...

PARTNERS