Code /* TestStack2.cpp CIS 250 David Klick Test program for templated stack class. */ #include "stackt.h" #include using std::cout; using std::endl; int main(void) { double i=0, n; stackt s(5); cout << "Filling stack with 0, 2.2, 4.4, ...\n"; while (!s.isFull()) { if (!s.push(i*2.2)) cout << "Failed to push " << (i*2.2) << '\n'; else cout << "Pushed " << (i*2.2) << " onto stack\n"; i++; } cout << "Displaying stack\n"; while (!s.isEmpty()) { s.pop(n); cout << n << '\n'; } return 0; }