Popping element from the top of the stack
stack < int > stack_pop ( stack < int > stack ) { cout << " Pop ▁ : " ; for ( int i = 0 ; i < 5 ; i ++ ) { int y = ( int ) stack . top ( ) ; stack . pop ( ) ; cout << ( y ) << endl ; } return stack ; }