loop through set c++ code example
Example: loop through set c++
// set::begin/end
#include
#include
int main ()
{
int myints[] = {75,23,65,42,13};
std::set myset (myints,myints+5);
std::cout << "myset contains:";
for (std::set::iterator it=myset.begin(); it!=myset.end(); ++it)
std::cout << ' ' << *it;
std::cout << '\n';
return 0;
}