Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void sort() {
- vector<Abonent> myVector;
- while (!st->empty()) {
- myVector.push_back(s.front());
- s.pop();
- }
- while (!myVector.empty()) {
- int maxIndex = 0;
- for (int i = 0; i < myVector.size(); i++)
- if (strcmp(myVector[i].NameLast, myVector[maxIndex].NameLast) < 0)
- maxIndex = i;
- s.push(myVector[maxIndex]);
- myVector.erase(myVector.begin() + maxIndex);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement