Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Card::Sort()
- {
- MyStruct* current_1 = first_;
- MyStruct* current_2 = current_1->next_;
- for (int count_1 = count_;count_1>0; count_1--)
- {
- for (int count_2 = count_1-1; count_2 > 0; count_2--)
- {
- if (current_1->year > current_2->year)
- std::swap(current_1, current_2);
- current_2 = current_2->next_;
- }
- current_1 = current_1->next_;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement