#ifndef EXAMPLE23_STACK_H #define EXAMPLE23_STACK_H template class Stack { public: int top; T arr[10]; Stack() : top(-1) { } void push(T value) { arr[++top] = value; } T pop() { return arr[top--]; } /* template // member template Stack& operator= (Stack& stack) { for (int i = 0; i <= stack.top; i++) { arr[i] = stack.arr[i]; } top=stack.top; return *this; } */ }; #endif //EXAMPLE23_STACK_H