#include #include "mydefs1b.h" void main() { Istack s1; // a stack of integers Cstack s3; // a stack of chars int i; s1.init(500); s3.init(); // default size of 100 for( i = 0; i < 20; i++ ) { s1.push(i); // also push(s1, i); } for( i = 0; i < 20; i++ ) { cout << s1.pop() << ' '; } cout << endl; for( i = 0; i < 20; i++ ) { s3.push('a' + i); // overloading push } for( i = 0; i < 20; i++ ) { cout << s3.pop() << ' '; } cout << endl; }