M
Mohd Azhar Hussain
I am novice C programmer.
i have to read a record from file which looks like
c|string1|string2$c|string1|string2$
I am trying to read using fscanf like
fscanf(fp,"%c|%[^|]s%[^$]s",&ch,string1,string2);
but im not getting c ,string1,string2
after playing around for some time I changed my fscanf to
fscanf(fp,"%c|%[^|]%c[^$]s",&ch,string1,string2);
which read successfully
can anyone tell me what's happening.
Thanks in advance.
i have to read a record from file which looks like
c|string1|string2$c|string1|string2$
I am trying to read using fscanf like
fscanf(fp,"%c|%[^|]s%[^$]s",&ch,string1,string2);
but im not getting c ,string1,string2
after playing around for some time I changed my fscanf to
fscanf(fp,"%c|%[^|]%c[^$]s",&ch,string1,string2);
which read successfully
can anyone tell me what's happening.
Thanks in advance.