如何在VScode中使用include bits/stdc++.h

最近发现一个很好用的头文件#include,它是为了方便程序员发明的,它包含了几乎所有常见的头文件,该文件的原文是这样的:

// C++ includes used for precompiling -*- C++ -*-

// Copyright (C) 2003-2016 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 
#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 
#include 
#endif

#if __cplusplus >= 201402L
#include 
#endif

可以看到它就是一个#include文件集。
但是我发现除了OJ之外,在VScode上使用会报错?
如何在VScode中使用include bits/stdc++.h_第1张图片我打开了Vscode使用的头文件路径所在的文件夹,发现该文件夹下确实没有stdc++.h头文件。
如何在VScode中使用include bits/stdc++.h_第2张图片于是我试着在电脑查找了一下stdc++.h头文件,发现MinGw文件下有。大家可以查找或者记下这个路径。
如何在VScode中使用include bits/stdc++.h_第3张图片
于是我复制了一份,放在了VScode对应的头文件文件夹中。就能愉快地使用#include

你可能感兴趣的:(#,C++编程)