#include #include #include "stack.h" using namespace std; int main() { ::stack s; //Call the constructor. s.push(10); s.push(20); cout << s.pop() << "\n"; //This pop will work correctly. s.~stack(); //Call the destructor explicitly. Never do this. cout << s.pop() << "\n"; //This pop may not work. return EXIT_SUCCESS; //Call the destructor implicitly; may not work. }