Stack Implemented in C++