home *** CD-ROM | disk | FTP | other *** search
- #include <iostream.h>
- #include "stk.h"
- #include <assert.h>
- #include <stdio.h>
-
- int main(void)
- {
- stack<int> s(10);
- stack<int> ss(10);
- stack<int> s2(10);
- stack<int> s3(10);
- cout << "\n\nCalling functions in the DLL\n\n";
- cout << "Number of stacks is " << stack<int>::numberOfStack << '\n';
- cout << "Pushing the following sequence of numbers on the stack: 2 4 1 3" << '\n';
- s.push(2);
- s.push(4);
- s.push(1);
- s.push(3);
- cout << "Poping the numbers from the stack: sequence expected 3 1 4 2\n";
- cout << "Sequence from Pop operations: ";
- cout << s.pop() << ' ' ;
- cout << s.pop() << ' ' ;
- cout << s.pop() << ' ' ;
- cout << s.pop() << '\n';
- cout << "Program terminates \n";
- return 0;
- }