c programming in VS2013, Warning: printf(): “Too few arguments when” no arguments are required?

家住魔仙堡 提交于 2020-01-06 06:45:36

问题


Hey guys I added this question to a similar post: Why is there: Warning: printf(): Too few arguments on line 59

and was told to open a new question.

My program still compiles and runs but keep getting this red underline on a simple printf statement saying too few arguments. But its just outputting a message no arguments are needed.

printf("Demonstrating use of operators with an integer variable called 'operation'...\n"); //<<-Warning
printf("operation = %d and -operation = %d\n", operation, -operation);

It doesn't matter what I change the text to it always has the warning with red underline. It still compiles and runs but no idea why it keeps warning me.

There was no warnings anywhere until I added a plain printf outputting a simple message. If I remove it and type a new one it comes back.

If I put it as the last line of code instead of the 1st one it still does it.

Any idea what might be causing this warning?

Note: I do have a lot of other stuff before this section of code these are the last 2 statements of the last function in the c file. Let me know if u want to see all of it but its a lot. All just basic stuff and truckload of comments (notes to myself just learning c).

来源:https://stackoverflow.com/questions/32032565/c-programming-in-vs2013-warning-printf-too-few-arguments-when-no-argument

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!