Answer the question
In order to leave comments, you need to log in
Sort strings alphabetically. How does it work in detail?
for (int i = 0; i <= t; i++)
{
for (int j = 0; j < t - 1; j++)
{
if (ende[j].name > ende[j + 1].name)
{
string k = ende[j].name;
ende[j].name = ende[j + 1].name; // поменяла мeстами
ende[j + 1].name = k;
}
}
cout << ende[i].name << endl;
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question