- #1
rocketboy
- 243
- 1
hey,
For this program I am writing in C, I am using stdio and the scanf function to detect input. Now, the person using the program commands in linux for the input to be given from a file, but the problem is I don't know how long the file is. So i have to keep scanf'ing until the file is finished.
Any ideas about how I could do this? I'm not very advanced with C.
Thanks,
-RB
For this program I am writing in C, I am using stdio and the scanf function to detect input. Now, the person using the program commands in linux for the input to be given from a file, but the problem is I don't know how long the file is. So i have to keep scanf'ing until the file is finished.
Any ideas about how I could do this? I'm not very advanced with C.
Thanks,
-RB