I want to have many objects of stl::set, able access and insert in each of them.
This could be partly done by vector < set<int> >.
But when I want to insert into these sets,... then my compiler doesn’t accept, since (?) this would change the iterator, making it not valid.
Has somebody a idea how to have many set-s, where I can access each of them and insert, erase, find,... in each of them?
oh, thanks
somehow it works now, doing what I want
but instead of set() in the 2. line I had to deklare before set <int> S; and write there S instead of set(). Is it possible do do without deklaration before?
---------
When I want to sort these sets and want there to exchange 2 of this sets, is there a better possibility that to copy both whole sets?
Is there a more elegant possibility, than to write down separately the number of the sets and the values after which is sorted, then sort. And for Acess to find there out which is the number of the smallest set?