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

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

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

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

比如我的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

Visual Studio 中使用万能头文件 #include <bits/stdc++.h>的更多相关文章

  1. 万能头文件#include<bits/stdc++.h>

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

  2. 万能头文件#include <bits/stdc++.h>

    最近在做题的时候看到别人的题解发现别人都用这个 突然之间打开新世界的大门 去百度之后才知道#include <bits/stdc++.h>包含了目前所有的c++头文件 也就是说只要用#in ...

  3. C++头文件#include<bits/stdc++.h>

    一句话的事,直截了当——#include<bits/stdc++.h>包含C++的所有头文件 参考网站(点击):http://www.tuicool.com/articles/m6neUj ...

  4. 6-关于#include<bits/stdc++.h>

    万能头文件#include<bits/stdc++.h> (转载)   最近在打cf时赛后翻阅别人的代码总是会发现一个陌生而奇怪的头文件#include<bits/stdc++.h& ...

  5. 万能头文件#include

    #include<bits/stdc++.h>包含了目前c++所包含的所有头文件!!!! 测试结果POJ不支持HDU,NYOJ支持

  6. #include<bits/stdc++.h>

    在听学长讲课时看到了#include<bits/stdc++.h>这个头文件,瞬间懵逼辣,百度后了解了 #include<bits/stdc++.h>,包含了C++的所有头文件 ...

  7. 关于#include <bits/stdc++.h>

    经常看人写#include <bits/stdc++.h>却不知道是干啥的? #include<bits/stdc++.h>包含了目前c++所包含的所有头文件 对比: #inc ...

  8. #include<bits/stdc++.h>的使用

    #include<bits/stdc++.h>包含了C++里面所有的库函数,因此在写任何程序的时候只需要加上#include<bits/stdc++.h>即可.

  9. 在Visual Studio中开发Matlab mex文件,生成mexw64/mexw32

    csunking贡献,2015-9-22 1712 1.   概述 通过使用C/C++与Matlab混合编程,既可以享受到C代码快速执行的速度,又可以方便的使用Matlab众多的库函数和强大的绘图功能 ...

随机推荐

  1. boost.log在项目中应用

    //头文件#pragma once #include <string> #include <boost/log/trivial.hpp> using std::string; ...

  2. 转换简体中文和繁体中文 cconv-0.6.2 for win32 static

    dos状态下 chcp 65001 echo "转换简体中文和繁体中文"|cconv -f utf-8 -t utf8-tw 显示 "轉換簡體中文和繁體中文" ...

  3. Debian下undefined reference to ‘pthread_create’问题解决

    今天在写线程测试程序(pthread_create)时出现如下问题, 明明在头文件中包含了<pthread.h>,但是仍然提示找不到函数 pthread_create 和 pthread_ ...

  4. MySQL 索引原理相关文章

    CSDN的整理: http://bbs.csdn.net/topics/392265880 引擎在磁盘中存储顺序的图解: http://blog.csdn.net/php_lzr/article/de ...

  5. thymeleaf:日常使用总结

    1.th:href 获得当前的根路径 th:href="@{/}" 2.select输出并自动选中 <select class="form-control sele ...

  6. python习题实例(上)_update18/07/03

    用以记录python学习过程中做过的小习题~ ヾ(◍°∇°◍)ノ゙ 1.生成两个列表,分别存放将100以内的偶数&奇数 odd_number=[] even_number=[] for i i ...

  7. CURL错误代码及含义

    https://curl.haxx.se/libcurl/c/libcurl-errors.html NAME libcurl-errors - error codes in libcurl DESC ...

  8. 【原创】大数据基础之Flume(2)应用之kafka-kudu

    应用一:kafka数据同步到kudu 1 准备kafka topic # bin/kafka-topics.sh --zookeeper $zk:2181/kafka -create --topic ...

  9. scrapy-redis(调度器Scheduler源码分析)

    settings里面的配置:'''当下面配置了这个(scrapy-redis)时候,下面的调度器已经配置在scrapy-redis里面了'''##########连接配置######## REDIS_ ...

  10. 洛谷P5072 [Ynoi2015]盼君勿忘 [莫队]

    传送门 辣鸡卡常题目浪费我一下午-- 思路 显然是一道莫队. 假设区间长度为\(len\),\(x\)的出现次数为\(k\),那么\(x\)的贡献就是\(x(2^{len-k}(2^k-1))\),即 ...