c - Stackdump Error working with Linked Lists -
i working on homework assignment linked lists. 1 of functions need write add node of linked list. code wrote in attempt follows:
void add_back(struct node **list, int value) { /* variable declarations */ struct node *pnewnode; /* pointer new node want add */ struct node *ptemp; /* temp pointer walking through list */ /* allocate space our new node , initialize member variables */ pnewnode = malloc(sizeof(struct node)); pnewnode->number = value; pnewnode->next = null; /* sets ptemp head pointer, don't mess */ ptemp = *list; /* while we're not @ end of list */ while(ptemp->next != null) { /* go next entry in list */ ptemp = ptemp->next; } /* have previous end of list point @ new end of list */ ptemp->next = pnewnode;
}
the specific error message i'm getting "0 [main] list 3384 cygwin_exception::open_stackdumpfile: dumping stack trace list.exe.stackdump"
i tried looking @ stackdump file try , gain insight, i'm not sure how interpret it.
edit: here pastebins 2 other functions possibly causing error.
edit2 here pastebin teacher's main function calling functions
Comments
Post a Comment