SyntaxFix
Write A Post
Hire A Developer
Questions
It's the destructor. This method is called when the instance of your class is destroyed:
Stack<int> *stack= new Stack<int>; //do something delete stack; //<- destructor is called here;