Hi...
I have a file myfile:
Fri Apr 01 23:28:17 SGT 2005,hello
Fri Apr 01 23:28:22 SGT 2005,how
Fri Apr 01 23:28:22 SGT 2005,are
Sat Apr 02 01:34:03 SGT 2005,you
Sat Apr 02 01:34:07 SGT 2005,?
How can i read a particular line from it?
I tried to use this to read the first line:
But it does not work. The string is empty...Code:char line[64]; FILE *f = fopen("myfile", "rw"); fscanf(f, "%s\n", &line);
Anyone know how to do? Thank you.