the problem with my code is that trace toggle can only be turn on, not off and trace does not demarcate the (substring) in progress. how do i fix this?
ah thank you for fixing that. however when i test the program by inputting a new list and then quicksorting it, the result has commas preceding it. how do i get rid of them?
I'm not quite sure if you mean that, even if you typed a comma in the new list, that you don't want it in the list later, or they are there, regardless if you typed it in the sentence for the list.
The comma have an ascii value of 44, a hyphen, 45 and a period, a 46. Capital A is a 65, up to a Z of 90. Lower case a, is 97, etc. So when you do a sort, that would be the order they are placed.
what i mean is when i test it this way: Enter the new list:2,4,3,s,d,f n - New list s - Quick Sort t - TraceMode d - Delimiter Char q - Quit Enter the option:s , , , , , 2 s 3 d 4 f , , , , , 2 s 3 d 4 f , , , , , 2 s 3 d 4 f , , , , , 2 s 3 d 4 f , , , , , 2 s 3 d 4 f , , , , , 2 s 3 d 4 f , , , , , 2 f 3 d 4 s , , , , , 2 4 3 d f s , , , , , 2 3 4 d f s , , , , , 2 3 4 d f s , , , , , 2 3 4 d f s sorted list :, , , , , 2 3 4 d f s
i need to get rid of the commas preceding the sorted list so it would just be
2 3 4 d f s instead of all those commas before the sorted list
ah okay but when i do trace mode for the quick sort there are still commas that precede the list being sorted so it looks like
, , , , , , 2 s 4 d 3 f n
, , , , , , etc