#ifndef _STACK_H_ #define _STACK_H_ #include using data_t = std::string; // you must correct the stack to store integers class Stack { public: Stack(); ~Stack(); Stack(Stack const&); Stack& operator=(Stack const&); bool isEmpty() const; void push(std::string const&); std::string pop(); std::string& top(); std::string const& top() const; private: class Element { public: Element(std::string const&, Element* n = nullptr); Element(Element const&) = delete; ~Element(); Element& operator=(Element const&) = delete; static Element* clone(Element const*); Element* next; std::string data; }; Element* mtop; }; #endif