Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (node* c = head; c != NULL; c = c->y)
- {
- for (node* prev = head, *current = head->y, *next = head->y->y; next != NULL; prev = prev->y, current = current->y, next = next->y)
- {
- if (next->x < current->x)
- {
- node* x = prev->y;
- prev->y = current->y;
- node* y = next->y;
- next->y = x;
- current->y = y;
- }
- }
- }
- //error:Exception thrown: read access violation.
- prev was nullptr.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement