C语言中#include的详细解释 应该怎么运用

C语言中#include的详细解释 应该怎么运用 希望有高手指点 看懂全部给分 谢谢!!!!!!
我的意思是在一个程序中是在什么地方什么场合需要用到他 不是单独的讲他是什么意思 最好是来段程序解释 那样更容易懂了 呵呵 在#include后面括号中的东西是程序本身带有的 还是我们自己定义的 有人说他是一个库函数 是程序自带的 那到底库函数又是什么意思 主要有什么用途 顺便留一下你们的QQ好吗 小弟还有好多要请教的呢 呵呵 再请教下 这里涉及到一个头文件和源文件 这2个到底有什么区别???

这个是C语言的头文件
#include <assert.h> //设定插入点
#include <ctype.h> //字符处理
#include <errno.h> //定义错误码
#include <float.h> //浮点数处理
#include <fstream.h> //文件输入/输出
#include <iomanip.h> //参数化输入/输出
#include <iostream.h> //数据流输入/输出
#include <limits.h> //定义各种数据类型最值常量
#include <locale.h> //定义本地化函数
#include <math.h> //定义数学函数
#include <stdio.h> //定义输入/输出函数
#include <stdlib.h> //定义杂项函数及内存分配函数
#include <string.h> //字符串处理
#include <strstrea.h> //基于数组的输入/输出
#include <time.h> //定义关于时间的函数
#include <wchar.h> //宽字符处理及输入/输出
#include <wctype.h> //宽字符分类

//////////////////////////////////////////////////////////////////////////

标准 C++ (同上的不再注释)

#include <algorithm> //STL 通用算法
#include <bitset> //STL 位集容器
#include <cctype>
#include <cerrno>
#include <clocale>
#include <cmath>
#include <complex> //复数类
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque> //STL 双端队列容器
#include <exception> //异常处理类
#include <fstream>
#include <functional> //STL 定义运算函数(代替运算符)
#include <limits>
#include <list> //STL 线性列表容器
#include <map> //STL 映射容器
#include <iomanip>
#include <ios> //基本输入/输出支持
#include <iosfwd> //输入/输出系统使用的前置声明
#include <iostream>
#include <istream> //基本输入流
#include <ostream> //基本输出流
#include <queue> //STL 队列容器
#include <set> //STL 集合容器
#include <sstream> //基于字符串的流
#include <stack> //STL 堆栈容器
#include <stdexcept> //标准异常类
#include <streambuf> //底层输入/输出支持
#include <string> //字符串类
#include <utility> //STL 通用模板类
#include <vector> //STL 动态数组容器
#include <cwchar>
#include <cwctype>

参考资料:http://blog.csdn.net/oury/archive/2005/02/12/286142.aspx

温馨提示:答案为网友推荐,仅供参考
第1个回答  推荐于2017-10-04
#include 可以理解为复制

#include <stdio.h>
就是查找stdio.h文件,找到之后把stdio.h文件中的所有文件内容复制到当前文件内,并且删除
#include <stdio.h>这条语句
第2个回答  2007-02-28
文件包含命令,就是把某一个文件包含进去。相当于直接把文件内容复制粘贴到使用该命令的位置。
第3个回答  2007-02-28
#include就是把某一个文件包含进去。相当于直接把文件内容复制粘贴过来。
第4个回答  2007-02-28
include 就是包含的意思,如果你有写的很好的函数这个文件要用到,你就可以把这个函数单独写入一个文件,哪一个要用的时候直接用include包含进来用就可以了!

相关了解……

你可能感兴趣的内容

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 非常风气网