how many arguments in fscanf of gcc?

A

asdf

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

will generate the following warning:

warning: too many arguments for format

how to fix it ? Thanks a lot.
 
Y

Yong Hu

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);
 
R

Rolf Magnus

asdf said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,444
Messages
2,571,709
Members
48,796
Latest member
Greg L.
Top