#include #include #include "stack.h" #include "date.h" using namespace std; int main() { ::stack s1; //could also say 50 + 50 ::stack s2; //same data type: 100 is the default s1.push(2.71); //e s1.push(3.14); //pi cout << s1.pop() << "\n"; cout << s1.pop() << "\n\n"; ::stack s3; s3.push(date(date::july, 4, 1776)); s3.push(date(date::october, 29, 1929)); s3.push(date(date::december, 7, 1941)); s3.push(date(date::july, 20, 1969)); s3.push(date(date::september, 11, 2001)); //will overflow the stack cout << s3.pop() << "\n"; cout << s3.pop() << "\n"; cout << s3.pop() << "\n"; cout << s3.pop() << "\n"; cout << s3.pop() << "\n"; return EXIT_SUCCESS; }