Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- poly *poly_duplicate(poly *P ){
- node *tempNode = P->terms;
- node *duplicateNode;
- node *nextNode = NULL;
- poly *p = malloc(sizeof(poly));
- for (int i=0; i < P->num_terms; i++) {
- tempNode->next = duplicateNode;
- duplicateNode = tempNode;
- p->terms = P->terms;
- p->num_terms = P->num_terms;
- //duplicateNode = tempNode;
- //tempNode = tempNode->next;
- }
- return p;
- //return NULL;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement