First page Back Continue Last page Graphics
test IntStackm
- int main ( void )
- {
- IntStack myStack ( 5 );
- int value;
- cout << “pusing 5 values “ << endl;
- for(int i = 0; i < 5; i ++ ) {
- value = i+10;
- cout << “pushing “ << value << endl;
- myStack.push ( i + 10 );}
- cout << “popping 5 values “ << endl;
- for(int i = 0; i < 5; i ++ ){
- myStack.pop(value);
- cout << value << endl;}
- }
-