Line 88-91: Why are you messing with argv[i] ? You acept input from input from the user via cin at lne 82.
Line 97: You're going to sort argv[i], not the input entered by the user at line 83. If the program was run with no arguments, you're not going to sort anything, the for loop at line 88 won't execute.
Line 102: You going to exit the program during the first iteration of the loop. You should be returning 0 AFTER line 103.