Advertisement
Guest User

Untitled

a guest
Apr 26th, 2015
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. void specAdd (listNode *&list)
  2. {
  3. if (list == NULL)
  4. return;
  5.  
  6. listNode *wp = list;
  7. listNode *fol = wp->next;
  8. int num;
  9.  
  10. while (wp != NULL)
  11. {
  12. num = (wp->number)*(wp->number);
  13. listNode *node = new listNode;
  14. node->next = fol;
  15. node->number = num;
  16. node->prev = wp;
  17. num = 0;
  18. wp = fol;
  19. fol = fol->next;
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement