C++ 中神奇的头文件,懒人专用
今天在做题的时候,偶然发现了一种神奇头文件。他的使用方法以及内容如下:
#include <bits/stdc++.h>
// C++ includes used for precompiling -*- C++ -*- // Copyright (C) 2003-2013 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version. // This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details. // Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation. // You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>. /** @file stdc++.h
* This is an implementation file for a precompiled header.
*/ // 17.4.1.2 Headers // C
#ifndef _GLIBCXX_NO_ASSERT
#include <cassert>
#endif
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime> #if __cplusplus >= 201103L
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
#include <cstdalign>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cwchar>
#include <cwctype>
#endif // C++
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector> #if __cplusplus >= 201103L
#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#endif
可以看到这个头文件几乎包括了所有的常用头文件,因此比较方便。
但并不是所有OJ都支持这个头文件。目前据我亲测,UVA,HDU(g++)是支持这个头文件的,其他OJ我没有尝试,希望使用这个头文件的可以自行尝试一下。
C++ 中神奇的头文件,懒人专用的更多相关文章
- Visual Studio 中使用万能头文件 #include <bits/stdc++.h>
最近开始使用VS,之前用的DEV C++软件可直接使用 #include <bits/stdc++.h> ,但VS中并没有,为了使用方便,可直接在VS中添加此头文件,方法如下: 1.在安 ...
- Makefile中自动生成头文件依赖
为什么需要自动生成头文件依赖? 编译单个源文件时,需要获取文件中包含的头文件的信息,但是一般的Makefile不会在规则中明确写明文件依赖的头文件,所以单独修改头文件后,不会导致包含头文件的源文件重新 ...
- c++中 预编译头文件PCH
转载:https://blog.csdn.net/lovemysea/article/details/74858430 一.预编译头文件使用经验: 如果预编译头文件被正确使用时,它确实大大提高我们编程 ...
- C++中#include包含头文件带 .h 和不带 .h 的区别
C++中#include包含头文件带 .h 和不带 .h 的区别? 如 #include <iostream> 和 #include <iostream.h> 包含的东西有哪些 ...
- vscode中c/c++头文件引用找不到飘红
正在进行 GTK 学习, 但是在 vscode GTK 的头文件找不到(头文件引用底下飘红, 逼死强迫症), 影响敲字键入速度. 解决一下该问题-- vscode中c/c++头文件引用找不到(#inc ...
- 使用CocoaPods,文档中出现引用头文件找不到的问题。
现在很多人都会使用CocoaPods来管理自己使用的第三方开源代码,这两天我的工程中碰到了这样一个问题,当我使用CocoaPods来进行三方源码的引入,但是在实际的工程当中引入出现了这样一个问题,就是 ...
- 通过词法分析实现的指出C程序中包含的头文件
在阅读有些程序的源码时,很希望能够马上弄清楚源码中到底包含了哪些头文件,以确定是否需要为了特殊的函数而手动加入#include.借助flex的词法分析实现了这一功能,本质上就是对正则表达式的匹配.注意 ...
- (转)linux中常用的头文件
头文件主目录include 头文件目录中总共有32个.h头文件.其中主目录下有13个,asm子目录中有4个,linux子目录中有10个,sys子目录中有5个.这些头文件各自的功能如下,具体的作用和所包 ...
- Linux中C/C++头文件一览
1.Linux中一些头文件的作用: #include <assert.h> //ANSI C.提供断言,assert(表达式) #include <glib.h> ...
随机推荐
- Django-rest-framework(一)简单入门使用
简单的使用 Django-rest-framework 建成DRF,可以帮助我们快速构建出 django的rest full 风格的api接口. 其源码容易理解,所以我们可以很方便的使用. 安装 pi ...
- vue入门: 实现选中并显示修改功能
1.实现功能 2.工具 vue 3.代码 <!DOCTYPE html> <html lang="en"> <head> <meta ch ...
- 看我如何使用IDEA引入GitHub上的Maven项目,从Clone到打开,图文步骤,你绝对看的懂!!
废话不多说,就一个字:干! 1.登录GitHub,复制项目仓库的地址 2.打开IDEA,选择git(三种方式选择) 第一种方式: 第二种方式: 第三种方式: 选择git后 3.下面是我改存放的目录 正 ...
- JSP的小心得
问题:Web容器(例如Tomcat)是怎么来执行jsp文件的? 首先它会将放在webapps目录下的jsp文件(这里以hello.jsp为例)翻译成hello_jsp.java文件并编译为hello_ ...
- 2018 Wannafly summer camp Day3--Shopping
Shopping 描述 题目描述: 你要买n件物品,其中有一些是凳子. 商场正在举行促销活动,如果购物车中有至少一个凳子,那么你可以半价购买这个购物车中最贵的一个物品. 你有m辆购物车,请最小化你的花 ...
- javaweb--json--ajax--mysql实现省市区三级联动(附三级联动数据库)
在web中,实现三级联动很常见,尤其是利用jquery+json.但是从根本上来说jquery并不是最能让人容易理解的,接下来从最基本的javascript开始,实现由javascript+json+ ...
- Docker与FastDFS的安装命令及使用
Docker特点 1)上手快 用户只需要几分钟,就可以把自己的程序“Docker 化”.Docker 依赖于“写时复制” (copy-on-write)模型,使修改应用程序也非常迅速,可以说达到“随心 ...
- 一道SQL面试题——表行列数据转换(表转置)
SQL语句如下: select country, sum(case when type='A' then money end) as A, sum(case when type='B' then mo ...
- JDK8新垃圾回收机制--G1垃圾回收机制
G1全称是Garbage First Garbage Collector,使用G1的目的是简化性能优化的复杂性.例如,G1的主要输入参数是初始化和最大Java堆大小.最大GC中断时间. G1 GC由Y ...
- linux 热替换so文件
http://www.zhaoch.top/操作系统/linux/热替换so文件.html 热替换so文件 www.zhaoch.top > 操作系统 > linux 发现nginx的动态 ...