Hi,
Im a little new to the C language and could use some help.
I understand that gets( ) can be used to read a line of input from stdin, as can sscanf etc
and I understand that fscanf can be used to read input from files.
what I would like to know is,
is there any function in the C library that resembles gets() but can be applied to a file?
essentially I am looking to read input from a file, one line at a time.
The reason I don't want fscanf is because I dont know how many values I want to read in ie it varies.
essentially, I have a variable :
char buf[256] ;
and in the way that this works:
gets(buf) ;
I would like something similar, except reading from file instead of stdin.
Thanks in advance