Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void specAdd (listNode *&list)
- {
- if (list == NULL)
- return;
- listNode *wp = list;
- listNode *fol = wp->next;
- int num;
- while (wp != NULL)
- {
- num = (wp->number)*(wp->number);
- listNode *node = new listNode;
- node->next = fol;
- node->number = num;
- node->prev = wp;
- num = 0;
- wp = fol;
- fol = fol->next;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement