传统 C++

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#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++

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#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>
在C++中,标准库的命名空间为std,因而包含了上述头文件时,一般会使用下列语句:
1
using namespace std;

C99 版本

1
2
3
4
5
6
#include <complex.h> //复数处理
#include <fenv.h> //浮点环境
#include <inttypes.h> //整数格式转换
#include <stdbool.h> //布尔环境
#include <stdint.h> //整型环境
#include <tgmath.h> //通用类型数学宏

c语言_头文件的更多相关文章

  1. c语言_头文件_stdlib

    简介 stdlib 头文件即standard library标准库头文件 stdlib 头文件里包含了C.C++语言的最常用的系统函数 该文件包含了C语言标准库函数的定义 stdlib.h里面定义了五 ...

  2. c语言_头文件_windows.h

    概述 Win32程序的开头都可看到: #include <windows.h> WINDOWS.H是一个最重要的头文件,它包含了其他Windows头文件,这些头文件的某些也包含了其他头文件 ...

  3. C/C++:提升_头文件的使用

    C/C++:提升_头文件的使用 ◇写在前面 学到现在,很多人编写程序时只会使用一个文件.这样在代码量较小的时候,更利于表达程序,但是随着代码量的逐步增加,程序的思维逻辑不是我们一下子就可以完全理清的, ...

  4. C语言中头文件怎么写?(本文来源网络,由黑乌鸦进一步完善)

      c语言头文件怎么写?我一直有这样的疑问,但是也一直没去问问到底咋回事:所以今天一定要把它弄明白! 其实学会写头文件之后可以为我们省去不少事情,可以避免书写大量的重复代码.有利于整理思路.使代码脉络 ...

  5. 零基础逆向工程16_C语言10_宏定义_头文件_内存分配_文件读写

    #define 无参数的宏定义的一般形式为:#define 标识符 字符序列 如:#define TRUE 1 注意事项: 1.之作字符序列的替换工作,不作任何语法的检查 2.如果宏定义不当,错误要到 ...

  6. c语言的头文件-不是c++类的头文件?

    下面的概述是参考的这篇文章:http://blog.csdn.net/bingxx11/article/details/7771437 c语言编程中也有,也需要头文件, 头文件不只是C++的类才需要! ...

  7. C语言之头文件,static与const关键字

    [前言] 最近几个月在做一个C语言代码重构的项目,过程中也让我对之前在书本上学习到的东西有些补充和巩固,在本博中总结记录下,梳理下零碎的知识点和经验也加深印象,书写是为了更好地思考.平时也都是用印象笔 ...

  8. C语言中头文件<stdio.h>中的#ifndef _STDIO_H_

    先了解这里的相关知识:http://www.cnblogs.com/stemon/p/4000468.html 头文件的中的#ifndef,这是一个很关键的东西.比如你有两个C文件,这两个C文件都in ...

  9. C语言中头文件和cpp文件解析

    务必提前预读这里的内容:http://www.cnblogs.com/stemon/p/3999844.html 回到cpp文件与头文件各写什么内容的话题上: 理论上来说cpp文件与头文件里的内容,只 ...

随机推荐

  1. python 学习 异常处理

    异常处理实例 while True: num1 = input('num1:') num2 = input('num2:') try: num1 = int(num1) num2 = int(num2 ...

  2. python--day4--迭代器、生成器

    列表生成式: 需求:列表[1,2,3,4,5,6,7,8,9]每个值加1,实现的方法: a = [0,1,2,3,4,5,6,7,8,9] b = [] for i in a:b.append(i+1 ...

  3. Mac软件记录

    前端: Brackets,sourceTree,dreamweaver,ps,ai,softmatic Weblayers. phpStorm,pyCharm,IDEA,eaclipse,XCODE, ...

  4. mybatis笔记(一)

    mybatis (一)传值 三种方式 1.直接传值void getMessageList(int userId,String userName);mapper.xml 获取 #{0}代表userId ...

  5. 分布式版本控制系统Git-----4.Git 常用命令整理

    1. git init 初始化 git 目录 2. git add 添加文件 git add fileName       #添加指定文件 git add -i             #手工选择要添 ...

  6. POJ 3740 Easy Finding

    #include<cstdio> #include<cstring> #include<cmath> #include<algorithm> using ...

  7. ZUFE OJ 2145 05机关图

    Description Ink最近得到了一张藏宝图,这张图上共有n个藏宝室,但因为年代久远藏宝图上的路已经模糊不清,于是Ink找到了智慧的Pseudo,Pseudo告诉Ink,这个宝藏中每两个藏宝室之 ...

  8. git切换分支

    今天同事问我她的报错了,我看了一下,是分支没有指向远程仓库对应的分支;报错如下; $ git pull There is no tracking information for the current ...

  9. for循环---几种写法

    最常见的写法 <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> < ...

  10. web前端工程师技能总结

    编辑器: 1 webstorm(建议版本10.0), 2 sublimeTEXT(建议版本3), 3 dreamweaver (建议版本CS6, CC2015)  浏览器: 1 firefox  建议 ...