for(vector<int>::iterator it = vec.begin(); it != vec.end(); it++)
cout << *it << " ";
cout << endl;
even when I comment out the returnfalse; line, which makes me think the compiler is adding something.
The idea is that the function should return false if the given string/vector is already the last permutation, but true if a new one is generated.
What I have seems fine to me, but the fact that it still works with a crucial line removed worries me. Is it just the compiler adding returnfalse at the end of the function for me that is creating this result?