vs2019怎么添加bits/stdc++.h万能头文件库

vs2019怎么添加bits/stdc++.h万能头文件库

好多同学使用Dev时可以正常使用bits万能库,然而到vc里发现运行不了,下面给一个方法让你们可以继续开心的使用他。
首先找到vs下载地址,不知道的可以找到这个安装包
在这里插入图片描述
点进去找到更多-修改
vs2019怎么添加bits/stdc++.h万能头文件库_第1张图片
vs2019怎么添加bits/stdc++.h万能头文件库_第2张图片
找到安装位置
在这里插入图片描述
复制第一行到计算机找到安装位置
在这里插入图片描述
重要的一步
复制下面代码新建一个文本文档粘贴进去


// C++ includes used for precompiling -*- C++ -*-
 
// Copyright (C) 2003-2015 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library.  This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.
 
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
 
// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.
 
// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
// .
 
/** @file stdc++.h
 *  This is an implementation file for a precompiled header.
 */
 
// 17.4.1.2 Headers
 
// C
#ifndef _GLIBCXX_NO_ASSERT
#include 
#endif
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
 
#if __cplusplus >= 201103L
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#endif
 
// C++
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
 
#if __cplusplus >= 201103L
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#endif

修改文件名称为stdc++.h
找到安装目录下的MSVC然后依次打开 14.24.28314——>include 这两个文件夹
不同的版本“14.24.28314”这个文件夹会不会一样。所以可以搜索任意一个头文件比如stdio.h 打开文件夹即可
在include文件夹里新建一个文件夹命名为bits 打开文件夹,把刚才的stdc++.h粘贴进去即可大功告成

你可能感兴趣的:(windows)