Implementation of a linked list stack abstraction in C++