常用的头文件如下
#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/C++ (同上的不再注释)
#include <algorithm> //STL 通用算法
#include <bitset> //STL 位集容器
#include <cctype>
#include <cerrno>
#include <clocale>
#include <cmath>
#include <complex> //复数类                                                                  #include <conio.h> // (键盘和屏幕) 输出输入函数
#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>
using namespace std;
//////////////////////////////////////////////////////////////////////////
C99 增加
#include <complex.h> //复数处理
#include <fenv.h> //浮点环境
#include <inttypes.h> //整数格式转换
#include <stdbool.h> //布尔环境
#include <stdint.h> //整型环境
#include <tgmath.h> //通用类型数学宏
C++快捷键大全
F1: 帮助
Ctrl+O :Open
Ctrl+P :Print
Ctrl+N :New
Ctrl+Shift+F2 :清除所有书签
F2 :上一个书签
Shift+F2 :上一个书签
Alt+F2 :编辑书签
Ctrl+F2 :添加/删除一个书签
F12 :Goto definition
Shift+F12 :Goto reference
Ctrl+'Num+' :Displays the next symbol definition or reference
Ctrl+'Num-' :Displays the previous symbol definition or reference
Ctrl+J/K :寻上一个/下一个预编译条件
Ctrl+Shift+J/K :寻上一个/下一个预编译条件并将这一块选定
Ctrl+End :文档尾
Ctrl+Shift+End :选定从当前位置到文档尾
Ctrl+Home :文档头
Ctrl+Shift+Home :选定从当前位置到文档头
Ctrl+B/Alt+F9 :编辑断点
Alt+F3/Ctrl+F :查
F3 :查下一个
Shift+F3 :查上一个
Ctrl+]/Ctrl+E :寻下一半括弧
Ctrl+Shift+] :寻下一半括弧并选定括弧之间的部分(包括括弧)
Ctrl+Shift+E :寻下一半括弧并选定括弧之间的部分(包括括弧)
F4 :寻下一个错误/警告位置
Shift+F4 :寻上一个错误/警告位置
Shift+Home :选定从当前位置到行首
Shift+End :选定从当前位置到行尾
Ctrl+L :剪切当前行
Ctrl+Shift+L :删除当前行
Alt+Shift+T :交换当前行和上一行
Ctrl+Alt+T :Brings up the completion list box
Shift+PageDown :选定从当前位置到下一页当前位置
Shift+PageUp :选定从当前位置到上一页当前位置
Ctrl+Shift+Space:显示函数参数的Tooltip
Ctrl+Z/Alt+Backspace :Undo
Ctrl+Shift+Z/Ctrl+Y :Redo
F8 :当前位置变成选定区域的头/尾(再移动光标或者点鼠标就会选定)
Ctrl+Shift+F8 :当前位置变成矩形选定区域的头/尾(再移动光标或者点鼠标就会选定)
Alt+F8 :自动格式重排
Ctrl+G :Goto
Ctlr+X/Shift+Del:Cut
Ctrl+C/Ctrl+Ins :Copy
Ctrl+V/Shift+Ins:Paste
Ctrl+U :将选定区域转换成小写
Ctrl+Shift+U :将选定区域转换成大写
Ctrl+F8 :当前行变成选定区域的头/尾(再移动上下光标或者点鼠标就会选定多行)
Ctrl+Shift+L :删除从当前位置到行尾
Ctrl+Shift+8 :将所有Tab变成`或者还原
Ctrl+T :显示变量类型
Ctrl+↑ :向上滚屏
Ctrl+↓ :向下滚屏
Ctrl+Del :删除当前单词的后半截(以光标为分割)
Ctrl+Backspace :删除当前单词的前半截(以光标为分割)
Ctrl+← :移到前一个单词
Ctrl+→ :移到后一个单词
Ctrl+Shift+← :选定当前位置到前一个单词
Ctrl+Shift+→ :选定当前位置到后一个单词
Ctrl+Shift+T :将本单词和上一个单词互换
paneAlt+0 :Workspace Window
Alt+2 :Output Window
Alt+3 :Watch Window
Alt+4 :Variables Window
Alt+5 :Registers Window
Alt+6 :Memory Window
Alt+7 :CallStack Window
Alt+8 :Disassembly Window
Ctrl+W :ClassWizard
Alt+Enter :属性
Alt+F7 :Project Settings
F7 :Build
Ctrl+F7 :Compile
Ctrl+F5 :Run
Ctrl+Break :Stops the build
F5 :Go
Ctrl+F10 :Run to cursor
F11 :step into
Alt+F10 :Apply codes changes
Ctrl+F9 :Enable/Disable a breakpoint
Alt+F11 :将 Memory Window 切换到下一种显示模式
Alt+Shift+F11 :将 Memory Window 切换到上一种显示模式
Ctrl+Shift+F9 :去掉所有断点
Ctrl+Shift+F5 :Restarts the program
Ctrl+Shift+F10 :将当前行设为下一条指令执行的行
Alt+Num* :滚动到当前指令
Shift+F11 :跳出当前函数
F9 :断点
F10 :step over
Shift+F5 :停止 Debugging
Ctrl+F11 :Switches between the source view and the disassembly view for this instruction
Alt+F12 :Queries on the selected object or current context