Sunday, July 12, 2009

Printf should have a prototype, ...what is this error in C...can ne one xplain.?

you didn't include the correct standard header file that tells the compiler what the printf function is supposed to look like. Until the compiler has seen that, it doesn't know what to make of printf.





I think you need, at the start of your file,


#include%26lt;stdio.h%26gt;


or maybe


#include%26lt;iostream.h%26gt;


the latter is for C++, the former for C





these header files contain the prototypes of all the normal input output functions. There are other headers for other functions.

Printf should have a prototype, ...what is this error in C...can ne one xplain.?
you should write #include %26lt;stdio.h%26gt; at the start of the program





for more information check out this link





http://www.cplusplus.com/ref/cstdio/prin...


No comments:

Post a Comment