#include "stack.h" #include using std::cout; using std::endl; int main(void) { int i=0, n; stack s(5); cout << "Filling stack with 0, 5, 10, ...\n"; while (!s.isFull()) { if (!s.push(i*5)) cout << "Failed to push " << (i*5) << '\n'; else cout << "Pushed " << (i*5) << " onto stack\n"; i++; } cout << "Displaying stack\n"; while (!s.isEmpty()) { s.pop(n); cout << n << '\n'; } return 0; }