Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <map>
- #include <set>
- #include <stack>
- #include <utility>
- #include <algorithm>
- typedef std::stack<std::pair<short, std::set<short>>> stack_t;
- int main()
- {
- std::set<short> x = {0, 1, 2, 3};
- stack_t my_stack;
- auto iter = my_stack.top(); // error (segmentation fault)
- my_stack.push(std::make_pair(3, x));
- iter = my_stack.top();
- //...
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement