diff options
Diffstat (limited to 'algo1w4d1/Stack.h')
-rw-r--r-- | algo1w4d1/Stack.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/algo1w4d1/Stack.h b/algo1w4d1/Stack.h new file mode 100644 index 0000000..a842bba --- /dev/null +++ b/algo1w4d1/Stack.h @@ -0,0 +1,19 @@ +#pragma once + +#include <string> +#include <vector> + +class Stack { +public: + void push(const std::string&); /** @brief append to stack */ + const std::string& pop(); /** @brief remove and return last value on stack */ + const std::string& peek(); /** @brief return but keep last value on stack */ + unsigned size(); /** @brief get size of stack */ + +public: + Stack(); + virtual ~Stack(); + +private: + std::vector<std::string> _stack; +}; |