sorry i'm was wrong.. because it already works when i put the temp->line = malloc(strlen(str)+1); before strcpy(temp->line,str); on the AddFirst() function
thanks you so much guys..
i'll post...
Type: Posts; User: jmyrrah
sorry i'm was wrong.. because it already works when i put the temp->line = malloc(strlen(str)+1); before strcpy(temp->line,str); on the AddFirst() function
thanks you so much guys..
i'll post...
but why is it that when i call the function display, it will display page number, line number, and the text.
Here is my struct:
struct notebook{
char *line;
int pagenum, linenum;
struct notebook *next;
}*note;
Thanks guys.. the above problem is solved. and i found again another problem. i have two function the AddFirst() and Append() both will insert a node. there is no problem with the AddFirst function...
Hi, this program I wrote is about creating a notebook using linked list as a final requirement. A notebook with a page number, line number and also a text on each line number.
Here is my insert...