There are lots of sort algorithms -- google for "bubble sort", which is the easiest one to write. Or you could use cl++ std::sort function.
#include <string>
#include <algorithm>
int main()
{
std::string s = "acefd";
std::sort(s.begin(),s.end());
]
Ancient Dragon
Achieved Level 70
32,145 posts since Aug 2005
Reputation Points: 5,836
Solved Threads: 2,577
Skill Endorsements: 69