Hello. All I need is to sort letters alphabetically. Program scans a row of capital latin letters. I do not know, what is best to create: an array, a string or a vector. But I need to sort these letters in alphabetic order. What is best way to dot it? You can write any of your ideas, thanks.
Thank you. And another one question: how to sort specific letters, ex: range [4; 7]? it is: WOFL to FLOW (from your example). Other letters keep untouched.
//Indexes start with 0, end iterator points to _after_ last character to sort
std::sort(row.begin() + 3, row.begin() + 7);
//or
std::sort(&row[3], &row[7]);