#ifndef STACK_H #define STACK_H #include #include class Stack { public: Stack(); //~ Stack(){ // while( first ) // { // pop(); // } // } // Stack(Stack const& rhs) : Stack() // { // *this = rhs; // } // Stack(Stack && rhs) : Stack() // { // *this = rhs; // } // Stack& operator = (Stack const& rhs) // { // *this = Stack{}; // Book* current{rhs.first}; // while (current) // { // push(current -> name); // current = current->next; // } // return *this; // } // Stack& operator = (Stack && rhs) // { // std::swap(first, rhs.first); // return *this; // } std::string to_string() const; void push(std::string t); //Pushes a book to the top of the stack void pop(); //Removes first book in stack std::string top() const; private: struct Book { std::string name; Book* next; }; Book* first; }; #endif