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 (current_1; current_1 > 0; current_1->next_)
- {
- for (current_2; current_2 > 0; current_2->next_)
- {
- if (current_1->year > current_2->year)
- std::swap(current_1->year, current_2->year);
- current_2 = current_2->next_;
- }
- current_1 = current_1->next_;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement