Advertisement
Guest User

Untitled

a guest
Feb 24th, 2020
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. void Card::Sort()
  2. {
  3. MyStruct* current_1 = first_;
  4. MyStruct* current_2 = current_1->next_;
  5. for (current_1; current_1 > 0; current_1->next_)
  6. {
  7. for (current_2; current_2 > 0; current_2->next_)
  8. {
  9. if (current_1->year > current_2->year)
  10. std::swap(current_1->year, current_2->year);
  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