Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void dodajDoListy(undoredo *&head, undoredo *&tail)
- {
- int m = 0;
- undoredo *nowy = new undoredo; //wydzielam pamiec dla nowego elementu listy
- tail = head;
- for (int i = 0; i < SIZE; i++){
- for (int j = 0; j < SIZE; j++){
- nowy->stany[m] = plansza[i][j].pole;
- m++;
- }
- }
- if (head == NULL)
- {
- head = nowy;
- head->next = nowy;
- }
- else
- {
- while (tail->next != NULL){}
- tail->next = nowy;
- nowy->prev = tail;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement