template class Stack { public: Stack(int = 10) ; ~Stack() { delete [] stackPtr ; } //<--- What does the \"~\" signify? int push(
This is a destructor. It's called when the object is destroyed (out of life scope or deleted).
To be clear, you have to use ~NameOfTheClass like for the constructor, other names are invalid.