// Test driver for integer Stack class #include using namespace std; #include "IntStack.h" int main() { IntStack s1; for (int i = 0; i < s1.length(); ++i) s1.push(3 + 2*i); while (!s1.empty()) cout << s1.pop() << " "; cout << endl; IntStack s2; for (int i = 0; i < 15; ++i) s2.push(i); s1 = s2; for (int i = 0; i < 7; ++i) cout << s2.pop() << " "; cout << endl; for (int i = 0; i < 9; ++i) cout << s1.pop() << " "; cout << endl; return 0; }