关于在visual studio.h2017中设置万能头文件

本文介绍了如何在Visual Studio 2017中解决不能使用scanf的情况下,通过创建bits文件夹并添加stdc++.h头文件,实现#include <bits/stdc++.h>的使用。步骤包括在VC安装路径下创建bits文件夹,并将stdc++.h文件放入其中,确保头文件的正确引用。
摘要由CSDN通过智能技术生成

#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>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值