How would I put a string in alphabetical order
thaks moe
This is a discussion on String help within the C++ Programming forums, part of the General Programming Boards category; How would I put a string in alphabetical order thaks moe...
How would I put a string in alphabetical order
thaks moe
How would you personally put a list of numbers in order? That ought to give you an idea.
You could use ascii values for the characters to order them, but first you must switch all the characters to the same case.
bubble sort?
EDIT: wait...no *slaps himself in forehead*Code:for(a=1; a<size; a++) { for(b=size-1; b>=a; b--) { t = string[b-1]; string[b-1] = string[b]; string[b] = t; } }
I am against the teaching of evolution in schools. I am also against widespread
literacy and the refrigeration of food.