高级c++头文件bits/stdc++.h

用这种方法声明头文件只需两行代码

#include<bits/stdc++.h>

using namespace std;

这个头文件包含以下等等C++中包含的所有头文件: 

#include <iostream> 
#include <cstdio> 
#include <fstream> 
#include <algorithm> 
#include <cmath> 
#include <deque> 
#include <vector> 
#include <queue> 
#include <string> 
#include <cstring> 
#include <map> 
#include <stack> 
#include <set> 

等等……

但是部分OJ站可能不支持这种写法

已知UVa可以这么用

 

 

补充:已知的弊端是,用这种方法声明库,写代码过程中,代码补全功能不会被激活

posted @ 2016-04-26 19:16  Orion_7  阅读(507)  评论(0编辑  收藏  举报