stack<pair<int,int> > s;
s.push( pair<int,int>( a, b ) );
s.pop();
pair<int,int> p = s.top();
1 Like
You can push in this way : s.push(make_pair(5,7));
.
Refer the discussion at => http://stackoverflow.com/a/2923088/1679643