SyntaxFix
Write A Post
Hire A Developer
Questions
Just use the * before it:
*
it
set<unsigned long>::iterator it; for (it = myset.begin(); it != myset.end(); ++it) { cout << *it; }
This dereferences it and allows you to access the element the iterator is currently on.