预处理程序指令包括< stdio.h> [英] The preprocessor directive include<stdio.h>

查看:84
本文介绍了预处理程序指令包括< stdio.h>的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用mingw的代码块作为我的编译器。我是编程新手。我的问题是为什么我的程序运行完美而没有包含在stdio.h中?但在某些情况下,它无法正常工作。我知道stdio.h包含标准的输入和输出函数:)但我听说现在已经有一天它已经在库中了,我们不需要写stdio.h ......但在某些情况下(不是总是)程序无法编译....准确地说我得到了这个错误

内置函数'printf'的不兼容隐式声明'[默认启用]

当我添加#include< stdio.h>问题不再存在了。

解释一下这个:)

如果你让我知道conio.h预处理器指令的使用,我也将不胜感激。

/ * thanks提前:) * /

解决方案

必须包含正确的头文件(例如,参见这个Stack Overflow问题:< a href =http://stackoverflow.com/questions/977233/warning-incompatible-implicit-declaration-of-built-in-function-xyz>警告:内置函数'xyz'的不兼容隐式声明 [ ^ ])。

如果您使用标准的 I / O 函数,那么您必须包含 stdio.h中

I am using code blocks with mingw as my compiler. I am new to programming. My ques is why does my program run perfectly without the inclusion on stdio.h ? But in some cases, it fails to work. I know that stdio.h contains standard input and output functions :) But i have heard that now a days it is already there in the library and we dont need to write stdio.h......But in SOME CASES(not always) the program fails to compile....To be precise I am getting this error
"" incompatible implicit declaration of built-in function 'printf' [enabled by default] ""
When i add #include<stdio.h> the problem is not there anymore.
Explain this :)
I would also appreciate if you let me know the uses of conio.h preprocessor directive :)
/* thanks in advance :) */

解决方案

You have to include the proper header files (see, for instance, this Stack Overflow question: "warning: incompatible implicit declaration of built-in function ‘xyz’"[^]).
If you use the standard I/O functions then you have to include stdio.h.


这篇关于预处理程序指令包括&lt; stdio.h&gt;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆