Is there a quick way to empty the variables of an object?
I made an instance of the class Game. Now let's say I want to start a new game all of a sudden, like when your character dies in the game, it says "Game Over" then asks you if you want to quit or start a new game. From my previous tries when I try to run the method I created called NewGame() all the values that I previously assigned to the instance didn't actually reset, they're still there. I solved this problem by emptying each variable before running the NewGame() method. I tought that maybe a Destructor would be useful to quicken this operation, but from my research it isn't possible to call a Destructor inside another method, it simply calls itself when the object isn't used anymore. Now my question is, is there a way to empty these variables automatically when I call the instance NewGame()? Any suggestions?