// cmpt225StackTemplate.cpp : Defines the entry point for the console application. // #include "StackT.h" #include #include #include using namespace std; void StackTemplateTest(); int main() { StackTemplateTest(); return 0; } void StackTemplateTest() { /* int n = 4; Stack st(n); for(int i=0; i < n; ++i){ st.push(i+1); } for(int i=0; i < n; ++i){ cout << st.pop() << endl; } vector v; v.push_back("bob"); v.push_back("kate"); for(int i=0; i < 2; ++i){ cout << v[i] << endl; } */ int n = 4; Stack st1(n); Stack st2(n); for(int i=0; i < n; ++i){ st1.push(i+1); } for(int i=0; i < n; ++i){ cout << st1.pop() << endl; } st2.push("aardvark"); st2.push("badger"); st2.push("crocodile"); st2.push("donkey"); for(int i=0; i < n; ++i){ cout << st2.pop() << endl; } }