Visual Studio 中使用万能头文件 #include

前言

最近开始使用VS,之前用的DEV C++软件可直接使用 #include <bits/stdc++.h> ,但VS中并没有,为了使用方便,可直接在VS中添加此头文件,方法如下:

#include<bits/stdc++.h>包含了目前c++所包含的所有头文件!!!!

操作步骤

1.在安装路径下,依次进入:

VC --> Tools --> MSVC --> 14.13.26128(此文件夹名每个人会有不同) --> include

2.在 include 文件夹下新建一个 bits 文件夹,在此文件夹下添加 stdc++.h 头文件,点此下载(解压后复制 stdc++.h 文件到新建的bits文件夹下即可)

也可以手动新建stdc++.h文件

比如我的VS安装在D盘,最后完成后的完整路径就是:

D:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.13.26128\include\bits

之后VS 就可以直接添加头文件 #include <bits/stdc++.h> 使用了。

附:stdc++.h 中的内容

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

原文链接:cnblog


加油!

感谢!

努力!

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

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

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

  2. 在VS中使用万能头文件#include bits/stdc++.h编译错误的解决方法

    2019独角兽企业重金招聘Python工程师标准>>> codeforces已经有过说明.我这里只是把它翻译地更加浅显一点: solution to include bits/std ...

  3. C++万能头文件#include“bits/stdc++.h”

    最近在打cf时赛后翻阅别人的代码总是会发现一个陌生而奇怪的头文件#include<bits/stdc++.h> 奇怪之处就在于基本上所有的代码只要用了这个头文件就不再写其他头文件了. 百度 ...

  4. 超详细!关于万能头文件<bits/stdc++.h>的细节

    万能头文件引言 相信大家在C/C++中一定也遇到过这些情况: 使用系统库函数(如C++<cmath>库,C<math.h>库的开方函数double sqrt(double))和 ...

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

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

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

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

  7. 【错误记录】Visual Studio 中配置 NDK 头文件路径 ( NDK 的三个头文件路径 | 与 CPU 架构相关 asm 头文件路径选择 )

    文章目录 一.报错信息 二.解决方案 1.NDK 的三个头文件路径 2.与 CPU 架构相关 asm 头文件路径选择 一.报错信息 参考 [Android 逆向]Android 进程注入工具开发 ( ...

  8. 解决vscode头文件<bits/stdc++.h>报错问题

    问题背景 在使用VScode时发现万能头文件<bits/stdc++.h>的包含语句下出现红色波浪线,但是能正常运行. #include <bits/stdc++.h> 解决思 ...

  9. C++头文件<bits/stdc++.h>详解

    文章目录 前言 基本用法 内容 优点和缺点 优点 缺点 适用环境 前言 最近学了几节c++编程课,发现老师经常在代码第一行敲上一句: #include <bits/c++std.h> 后来 ...

最新文章

  1. ajax跨域请求问题总结
  2. 类库java_Java类库和常用类库介绍
  3. 小程序动画从头开始_渐进式Web应用程序102:从头开始构建渐进式Web应用程序
  4. linux socket编程web服务器实现报文解析,[Socket][网络编程]程序范例:Linux下连接WEB服务器...
  5. C基础——文本格式和二进制格式的区别
  6. LCA问题——倍增算法,Tarjan算法讲解
  7. TracePro模拟LED手电筒整个照明系统并分析
  8. 海康威视摄像头网线连接笔记本电脑,客户端提示:1连接设备失败。设备不在线或网络原因引起的连接超时等。(HCNetSDK.dll[7].)解决方案
  9. html怎么设置img样式,css默认样式 css中img默认样式问题
  10. 566页19万字区级一网通办政务服务应用平台建设项目方案书
  11. 建网站如何选择空间?
  12. 解密通往元宇宙的三大入口,VR先上AR紧跟,但脑机接口才是未来
  13. 罗马数字 古罗马数字转换为阿拉伯数字
  14. 蓝桥杯 ADV168 算法提高 快乐司机(贪心 快排)(java)
  15. 《嵌入式linux内存使用与性能优化》读书笔记
  16. 全网最全资源需要的看过来---分享是一种情怀
  17. VulnHub narak
  18. linux软AP--hostapd+dhcpd
  19. 【C语言】操作符(运算符)
  20. 聊聊CentOS系统调用

热门文章

  1. 嗨!亲爱的朋友们,欢迎您光临我的BLOG
  2. 全国计算机四级之网络工程师知识点(五)
  3. Java学习星球,Java学习路线
  4. 我的奋斗之黑马第一天
  5. [CS144] Lab 1: stitching substrings into a byte
  6. 关于python程序格式框架以下选项中描述错误的是_关于Python程序格式框架的描述,以下选项中错误的是...
  7. 算法之排序算法(冒泡法和选择法)
  8. 【深度学习】使用labelImg标注图像
  9. 使用python计算水仙花数
  10. asp.net word操作