Hi guys, i'm here bothering you again...
I have a problem and i know i'm messing up the pointers (as usual) :oP
the thing is... i have a function that opens a file, this function calls another function that goes through a list and find out what will be "printed" in that file, then this function calls another function that will really "prints" inside the file...
the thing is that i'm getting files with size 0 and it's probably because well, i need to pass the file variable by reference right??? and i think i'm messing up the * chars :oP
could someone give me just an example how i do it???
and btw, i'm using fprintf because i need to print 2 strings at the same time :o)
my fprintf is this
its inside a switch that checks what kind of element it is :o) and the first string needs to be "printed" inside ".Code:fprintf (*arq,"\"%s\" %s\n", X->elem.toelem->nomelem->tpselem,X->elem.toelem->fonelem->tpselem);break;
could someone help me???