Set

how can i make a Two-dimensional set?
for example :
{{1,2,3} ,{1,2,4}}
Last edited on
You can have a set of sets...

1
2
3
#include <set>

std::set<std::set<int> > SetSet;


But if you're not using C++11 you'll have to use a temporary set<int> which you'll insert() into SetSet.

http://www.cplusplus.com/reference/stl/set/
http://www.cplusplus.com/reference/stl/set/insert/

If you're using C++11, you can work with initializer lists...

Topic archived. No new replies allowed.