Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void sort(list **begin) {
- list*temp = *begin;
- /*if (temp == NULL) {
- cout << "Нет данных\n" << endl;
- return;
- }*/
- list*temp1 = temp->next;
- list *t = *begin;
- list *next,*prev,*sh;
- for (int i = 0; i<2/*temp != NULL*/; i++) {
- int count = 0;
- while (temp1 != NULL) {
- if (temp->data1.Anumb == temp1->data1.Anumb)
- {
- count++;
- }
- temp->data1.count = count;
- //cout <<"\n"<< temp->data1.count << " ЭТО COUNT\n";
- //cout << temp->data1.Anumb << " ЭТО Число\n";
- temp1 = temp1->next;
- }
- sh = temp->next;
- prev = temp;
- next = sh->next;
- sh->next = prev;
- prev->next = next;
- }
- //cout << temp->data1.count << " всего count\n";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement