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?
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 */ }
All problems in computer science can be solved by another level of indirection,
except for the problem of too many layers of indirection.
– David J. Wheeler
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
All problems in computer science can be solved by another level of indirection,
except for the problem of too many layers of indirection.
– David J. Wheeler
ic thanks