#include #include #include "stack.h" using namespace std ; int main(int argc, char * argv[]) { Stack fs(5) ; float f = 1.1 ; cout << "pushing: " ; while (fs.push(f)) { cout << f << ' ' ; f += 1.1 ; } cout << endl << "Stop! Stack Full." << endl ; cout << "popping:" ; while (fs.pop(f)) cout << f << ' ' ; cout << endl << "Stop! Stack is Empty." << endl ; Stack is(5) ; int i = 1 ; cout << "pushing: " ; while (is.push(i)) { cout << i << ' ' ; i += 1 ; } cout << endl << "Stop! Stack Full." << endl ; cout << "popping:" ; while (is.pop(i)) cout << i << ' ' ; cout << endl << "Stop! Stack is empty!" << endl ; return EXIT_SUCCESS ; }