A stack implementation in C++