Hello,
I'm working on a function that is supposed to impose brute force algorithm on a set of chars. Here is what I have so far
set<string> permutation(set<char>S)
{
set<string> fun;
string myString;
do{
for(set<char>::iterator it=S.begin(); it !=S.end(); ++it){
myString += *it;
}
fun.insert(myString);
}while(next_permutation(S.begin(), S.end()));
return fun;
}
due to my lack of knowledge of sets & stl, I've run into some difficulties. I believe that everything works properly except the next_permutations function. Any pointers?