471,052 Members | 1,205 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,052 software developers and data experts.

how many arguments in fscanf of gcc?

fscanf(fp,"\n", &intensity);

will generate the following warning:

warning: too many arguments for format

how to fix it ? Thanks a lot.

Jul 5 '06 #1
2 3367

asdf 写道:
fscanf(fp,"\n", &intensity);

will generate the following warning:

warning: too many arguments for format

how to fix it ? Thanks a lot.
Try this:

int intensity;

fscanf(fp, "%d", &intensity);

Jul 5 '06 #2
asdf wrote:
fscanf(fp,"\n", &intensity);

will generate the following warning:

warning: too many arguments for format

how to fix it ?
Well, your fscanf call has one argument after the format string, but the
format string itself says that there are no more arguments. You should look
up in your documentation how fsanf works. Your format string makes no
sense.
Jul 5 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

25 posts views Thread by David Bernier | last post: by
3 posts views Thread by Benedicte | last post: by
4 posts views Thread by Psibur | last post: by
7 posts views Thread by Thomas Sourmail | last post: by
1 post views Thread by siliconwafer | last post: by
9 posts views Thread by quyvle | last post: by
37 posts views Thread by PeterOut | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.