Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int addNode_str2(char* val,str_node_t **nd){
- str_node_t* node = (str_node_t* )malloc(sizeof(mpz_node_t));
- if(node==NULL) return -1;
- strcpy(node->value,val); //make a copy or it disapear...
- if((*nd) == NULL || (*nd)->last == NULL){
- (*nd) = node;
- (*nd)->last = node;
- }else {
- (*nd)->last -> next = node;
- (*nd)->last = node;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement