Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void sort(book **beg) {
- book* temp_i = *beg,
- * temp_j = *beg;
- for (; temp_i; temp_i = temp_i->next) {
- for (temp_j = temp_i; temp_j; temp_j = temp_j->next) {
- if (temp_i->inf.cost > temp_j->inf.cost) {
- swap(temp_i->inf, temp_j->inf);
- }
- }
- }
- cout << "Сортировка прошла успешно" << endl;
- system("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement