Stick it between where you generate the list and where you print it.
made a typo: it should be
However, don't do that
(Unless, of course, your assignment specifically asks you to output the strings in alphabetical order.)
A few notes
should not be a global object. Make it local just like input
You never use the filenames outside of opening the files. You can make your code simpler and shorter with just:
int main(int argc, char* argv)
ArgumentManager am(argc, argv);
You should be returning zero from main. Non-zero values indicate that something went wrong.
If you are allowed, you can also get rid of that global list
by making it a reference argument to permute
. Then you can use it as a local variable as well (local to main
). For now, though, don't worry about that stuff.
Also, people will give you grief about using namespace std
. There are only a few places that is really ever reasonable. You should make it a habit now, early, to be clear about what namespace you are pulling things from:
Then you can get rid of the 'evil' using namespace std clause.
Nicely done on the permutation!
Hope this helps.