this command (fgets(buffer,63,in) puts 63 chars into buffer
so if it succeeds it return true
if it reaches EOF it gives false?
Printable View
this command (fgets(buffer,63,in) puts 63 chars into buffer
so if it succeeds it return true
if it reaches EOF it gives false?
do i have to use spaces between %s
fscanf(buffer, "%s %s %d %s", fname, lname, age, comment);
why not
fscanf(buffer,"%s%s%d%s", fname, lname, age, comment);
this spaces gave me problems on a program where i needed to press another enter
to end the scan
so can i remove the spaces?
Okay, I will concur with vart on this point, and that the OP could probably save some time by using such a compiler, in fact. I am not trying to work all the nitty gritty details out for you, just some suggestions...it is up to you to consult the docs and use your computer for something other than forum posts. Or am I supposed to write some quick code to find out whether or not the spaces in a scanf template cause a problem? If I was doing the work, that is something simple and obvious you can easily work out during the process. But instead, I think I will compose some more messages...Quote:
Originally Posted by vart
Code:is that the same sky I see thru my windowpane
this [^$] means till char $
this [^d] means till char d
%*c means skip the rest
??