#pragma warning(disable:4996)->在使用不了scanf的情况下使用
1.在安装路径下,依次进入:
1
VC --> Tools --> MSVC --> 14.13.26128(此文件夹名每个人会有不同) --> include
2.在 include 文件夹下新建一个 bits 文件夹,在此文件夹下添加 stdc++.h 头文件,https://files-cdn.cnblogs.com/files/pgzhang/stdcpp.rar
(解压后复制 stdc++.h 文件到新建的bits文件夹下即可)
比如我的VS安装在D盘,最后完成后的完整路径就是:
1
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>