Hello all. I've been trying so many combinations of this that my head has gone to jelly and i'm probably doing stupid things. Anyways. My program reads data from a file. some examples are:
IDEN var1
OPER +
OPER :=
DIGI 89
STRN 'This is a string'
previously this would work:
IDEN would be in first and var1 would be in second and so on.Code:char *first,*second; //some malloc stuff here fscanf(file, "%s %s", first, second);
appart from the STRN one. it puts "STRN" in first all right, but only " 'This "in second.
I've being trying lots of different variations of this and it either seg faults or gives useless output
and don't forget that the solution still has to work for the previous IDEN, OPER and DIGI tags too....
anyone have any thoughts? i'd be eternally greatful....
kgmf