The standard library includes a sorting algorithm in the header algorithm>.
Because it sorts in place, the following will sort your original term.
std::sort(word.begin(), word.end());
Make a copy beforehand if you don't want to lose the original.
std::string sortedWord = word;
std::sort(sortedWord.begin(), sortedWord.end());