Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void sortowanie(Struktura **tab_s, int N) // Do poprawienia
- {
- Struktura *temp = (Struktura*)malloc(sizeof(Struktura));
- for (int i = 0; i < N; i++)
- {
- bool czy_posortowane = true;
- for (int j = N-1; j > i; j--)
- {
- if (tab_s[j-1]->i > tab_s[j]->i)
- {
- temp = tab_s[j-1];
- tab_s[j-1] = tab_s[j];
- tab_s[j] = temp;
- czy_posortowane = false;
- }
- }
- if (czy_posortowane) return;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment