Advertisement
Guest User

Untitled

a guest
Feb 24th, 2020
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. void Card::Sort()
  2. {
  3. MyStruct* current_1 = first_;
  4. MyStruct* current_2 = current_1->next_;
  5. for (int count_1 = count_;count_1>0; count_1--)
  6. {
  7. for (int count_2 = count_1-1; count_2 > 0; count_2--)
  8. {
  9. if (current_1->year > current_2->year)
  10. std::swap(current_1, current_2);
  11. current_2 = current_2->next_;
  12. }
  13. current_1 = current_1->next_;
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement