#pragma once #include /** * A stack data structure. */ template class Stack { public: /** * Creates a stack. * * @param capacity The capacity of the stack */ Stack(unsigned long capacity); /** * Pushes a item onto the stack. */ void push(Item item); /** * Pops the topmost item from the stack. */ void pop(); /** * Peeks into the stack. * * @returns The topmost stack item. */ Item peek(); private: std::vector _items; }; #include "stack.tpp"