468,468 Members | 2,690 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,468 developers. It's quick & easy.

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 3221

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 NPC403 | last post: by
1 post views Thread by kmladenovski | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.