로딩
요청 처리 중입니다...

[C++] Stack 구현(클래스)

 [C++] Stack 구현(클래스)

#include #include using namespace std; template class Stack_template { private: T* arr; int capacity; int top; public: Stack_template(); Stack_template(int size); ~Stack_template(); bool isEmpty(); bool isFull(); T peek(); void push(T num); T pop(); }; template Stack_template::Stack_template() :capacity(3) { arr = new T[capacity]; top = -1; } template Stack_template::Stack_template(int size) :capacity(size) { arr = new T[capacity]; to...