I'm studying for a exam next week and I've come across a question in my book that I can't get to work. Says that suppose set<char> s;
is declared now write a loop to insert all 26 letters into s.
What I've got is
for(int i = 0; i < 26; i++)
{
s.insert('A') + i;
}
Something similar to this would work for an array I believe, but not for this template class. I know I don't have to insert each letter I just don't know how I could run through the alphabet.