Click here to Skip to main content
15,910,872 members

Comments by Merav Kochavi (Top 2 by date)

Merav Kochavi 4-Aug-15 8:40am View    
You can also use an iterator to iterator over 's' and use the old fashion loop style to iterate over 'c' as such:

for (set<vector<int>>::iterator c = s.begin(); c != s.end(); c++)
{
for (int i = 0; i < c->size(); i++)
cout << (*c)[i] << " ";
cout << endl;
}
Merav Kochavi 4-Aug-15 8:15am View    
I believe the auto is the simplest and most readable way to iterate through this type of data structure.