// Project Stack // File main.cpp #include using namespace std; #include "stack.h" int main() { Stack x(4); x.push(37); cout << x.is_full() << " " << x.peek() << endl; x.push(19); cout << x.is_full() << " " << x.peek() << endl; x.push(58); cout << x.is_full() << " " << x.peek() << endl; x.push(31); cout << x.is_full() << " " << x.peek() << endl; x.pop(); x.pop(); cout << x.is_empty() << " " << x.peek() << endl; x.pop(); x.pop(); cout << x.is_empty() << " " << x.peek() << endl; return EXIT_SUCCESS; } // Output: 0 37 0 19 0 58 1 31 0 19 1 0