Stack implemented as linked list using C++