template<classT> TStack<T>::Pop() { if (isEmpty()) { throw runtime_error("No elements in the stack"); } else { T data = arrays[top]; top--; return data; } }
template<classT> TStack<T>::Top() { if (isEmpty()) { throw runtime_error("No elements in the stack"); } else { return arrays[top]; } }
template<classT> boolStack<T>::isEmpty() { return top == -1; }
template<classT> boolStack<T>::isFull() { return top == maxSize - 1; }