Recall the data members for the pointer-based implementation…
Recall the data members for the pointer-based implementation of class Stack struct Node{ int item; Node* next; }; class Stack{ private: Node* head; }; Write a C++ implementation of the member function pop, which removes (pops) the top item from the stack and store it in the reference parameter item. You don’t have to include error handling, class definition, header files, or the main() function. The function header is given below: void Stack::pop(int& item);
Read Details