c++万能头文件

最近在牛客网刷题经常会看到讨论区大神们的用了一个非常陌生的头文件
#include<bits/stdc++.h>
这个头文件包含了现在我们使用的大多数头文件,由于好奇,我就跟着动手查了一下
没想到发现了一个宝藏头文件
但是VS下并不自带这个头文件,如果使用的话需要进行手动添加到include文件夹中

1. VS下安装过程

  1. 找到资源管理器
  2. 在解决方案上点击右键进入属性
  3. 复制有关于include文件夹的路径

例如我的vs下的这个文件路径是:D:\vs2013\VC\atlmfc\include
进入这个文件夹后,手动添加一个bits的文件夹,然后添加bits/stdc++.h头文件,可以自己用vs写一个,也可以在网上下
然后重启VS就可以了

该文件下所包含的头文件

// 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

这个包含了大多数的头文件,有一写例如cpp#include <windows.h>并不存在,但是这个大大减少了我们的代码量

不过这个头文件也并不是适用于所有的oj
在国内oj中,poj,hdu 不支持这个函数,这几个oj的编译器问题,其他国外的oj,还有台湾的oj都支持,CF,Topcoder也都支持。
对于牛客网,leetcode等oj网站还是比较适用的。

VS下C++万能头文件使用以及安装方法相关推荐

  1. Windows10下Latex缺少sty文件时的安装方法

    问题描述 使用texstudio写论文,想添加一个附录,需要导入\usepackage{appendix},但是texstudio一直报错: LaTeX Error: File `appendix.s ...

  2. MAC OS下设置bits/stdc++.h万能头文件

    在MAC下用atom写c++程序时用到万能头文件会比较方便. 准备: 下载xcode或者command line developer tools 地址:https://developer.apple. ...

  3. c++万能头文件_初学Python,与C对比

    ✎背景学了一学年的C的基础,下学年开课Python,现在正在自学中...C也不是不学了,而是之前买了一本<C++Primer>在学校里,就准备先学一下Python,下学期利用自由时间接着学 ...

  4. VScode找不到C++万能头文件<bits/stdc++.h>解决办法

    VScode找不到C++万能头文件<bits/stdc++.h>解决办法 一.万能头文件介绍 万能头文件<bits/stdc++> 中包含了 C++中大部分头文件,在大部分做题 ...

  5. Visual Studio 中使用万能头文件 #include bits/stdc++.h

    进行各种练习赛后,看题解代码时经常会看到这么一个陌生的头文件 #include <bits/stdc++.h> ,这个头文件是一个C++万能头文件,里面包含了程序比赛中所有可能用到的头文件 ...

  6. Visual Studio 中使用万能头文件 #include <bits/stdc++.h>

    Visual Studio 中使用万能头文件 #include 前言 最近开始使用VS,之前用的DEV C++软件可直接使用 #include <bits/stdc++.h> ,但VS中并 ...

  7. macOS使用C/C++万能头文件保姆级教程

    macOS使用C/C++万能头文件保姆级教程 Windows上面用万能头文件为我们省去了不少记头文件的麻烦,切换到macOS上来发现C/C++环境中没有自带这个头文件.不行,今天无论如何都要用到万能头 ...

  8. 【C++】万能头文件 <bits/stdc++.h> 的用法和优缺点

    [C++]万能头文件 bits/stdc++.h 的用法和优缺点 文章目录 [C++]万能头文件 bits/stdc++.h 的用法和优缺点 一.使用方法 二.头文件的内容 三.VS 中如何使用 四. ...

  9. VS C++万能头文件bits/stdc++.h的配置

    万能头文件:#include<bits/stdc++.h> 路径:C:\Program Files\Microsoft Visual Studio\2022\Community\VC\To ...

最新文章

  1. BZOJ 2957楼房重建
  2. 2021年用于图像处理的Python顶级库
  3. (0083)iOS开发之layoutSubviews 的调用时机
  4. Leetcode 95. 不同的二叉搜索树 II 解题思路及C++实现
  5. Windows 驱动开发资源链接
  6. 征战蓝桥 —— 2016年第七届 —— C/C++A组第8题——四平方和
  7. 聊聊HTTPS和SSL/TLS协议
  8. 什么是前端开发中的Pseudo elements
  9. c++ 输出控制iomanip
  10. php json追加500错误,在composer.json中添加了一个git地址;composer update 报错
  11. Android studio 创建kotlin工程
  12. 另存为里面没有jpg_CAD图不会转JPG?教你两个方法,从此CAD格式转换不再烦恼
  13. 结对开发2(求二维数组的最大子数组和)
  14. 网络错误0x80070005,访问被拒绝[亲测解决]
  15. 深响|对话THE9演唱会主创:技术打开想象力,未来的娱乐还能这么玩
  16. 004.麻雀虽小五脏俱全--最简单的JavaWeb
  17. 【DDD 8】领域驱动设计实践 —— Application层实现
  18. php活动倒计时代码,JavaScript实现活动倒计时效果的代码分享
  19. 服务器监控之ping监控
  20. Swift 使用NSRange 查找字符多次出现的位置处理

热门文章

  1. 如何让SPRO配置页面中显示对应的事务代码
  2. 2023年春节档票房排名
  3. 金科院c语言实验报告册,金陵科技学院c语言
  4. 写一篇1000字关于满江红电影的观后感
  5. 关于我们-成功人士西装定制服务第一品牌派斯特PAISTETAILOR绅士礼服
  6. 门禁系统数据库服务器配置,门禁系统数据库服务器如何配置
  7. Creo螺旋扫描、方程曲线
  8. 原码、反码、补码、移码、尾码、阶码
  9. 期望、方差、标准差、标准化、归一化
  10. 【组合导航代码ECL】状态融合函数FuseMag函数(0.fuse with freee decline 1.fuse with got decline 2.fuse magheading )