Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

pair in stack

stack<pair<char, int>> s;
s.push({'A', 20 });
s.push(make_pair('B', 30));
cout << s.top().first << " " << s.top().second;
s.pop();
 
PREVIOUS NEXT
Tagged: #pair #stack
ADD COMMENT
Topic
Name
3+5 =