a have a struct like this :
i have a simple text file, which i read with fgets to get the text, like this :
while (fgets(line, MAX_TEXT, hSource) != NULL)
up to here everything is ok. But because i want to implement a simple linked list, i do this too :
nodo_aux = new nodo_text;
nodo_aux->texto = line; /* HERE IS THE PROBLEM */
if i leave it like that, the last line that comes from the file i am reading stays in all the nodes of the list. I jsut want to copy from line to my text member node list!!!!
a cannot find a way to copy from line (an array) to
nodo_aux->texto. if i use strcpy like this :
i get an access violation error.
If i declare line to be :
i get an assertion failed.
does anybody can help me???
thanks a lot in advance,