hi guys,
char mystring [100];
fget(mystring , 50, myFile);
does it means that i can only read 100 words from a myFile? what if myFile consist of alot of words and cant be determined?
This is a discussion on fget question within the C Programming forums, part of the General Programming Boards category; hi guys, char mystring [100]; fget(mystring , 50, myFile); does it means that i can only read 100 words from ...
hi guys,
char mystring [100];
fget(mystring , 50, myFile);
does it means that i can only read 100 words from a myFile? what if myFile consist of alot of words and cant be determined?
you will use a loop
Code:while(fgets(mystring,sizeof mystring, myfile)) { /*process mystring buffer */ }
If I have eight hours for cutting wood, I spend six sharpening my axe.
yea but i already declared mystring to an array size of 100. does dat makes any difference?
doesnt it means dat the max number of words will be set to 100? im confuse now lol
ic thanks