1.首先我们打开一个项目,找到资源管理器,并找到如下图右边所示的 解决方案~ 然后右键 右键进入 属性 页面 2.最后在 调试源文件 下可以看到具体路径。 二 按照路径我们进入 include 文件夹 并在里面新建文件夹 bits 进入后再添加头文件 stdc++.h (可以在桌面创建 文本文档 并把头文件的内容复制进去,再改一下文件名,头文件的内容我会放在最后) 三 按照上面的步骤操作后,重启VS进入项目,或许有些人(我就是其一)会发现VS依然显示无法打开这个头文件,在经过一番查阅之后,问题出现在对 stdc++.h重命名这步上。在win10里,文件名的后缀默认是隐藏的,所以下面给出具体解决方案(要是一切运行正常的同学就可以跳过这一步了) 1.首先按照之前找到的路径进入 include 将光标移动到我们新建的文件夹 bits 上并单击,上方会出现窗口,然后我们继续点击 查看,进入一下页面 然后勾选 文件拓展名 就可以了,再进入 bits 就可以看到文件的后缀,在重新进行修改为 stdc++.h就可以了,之后重启VS就大功告成了 /下面是给大家找到的头文件的内容/// ``` // C++ includes used for precompiling -*- C++ -*- // Copyright (C) 2003-2013 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 ``` 直链下载:https://drive.skyw.cc/down.php/f147b4e17e395dfb6f95522903bc8a32.h ———————————————— 版权声明:本文为CSDN博主「阿旭啊_」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。 原文链接:https://blog.csdn.net/m0_64744234/article/details/122643525 Loading... 1.首先我们打开一个项目,找到资源管理器,并找到如下图右边所示的 解决方案~ 然后右键 右键进入 属性 页面 2.最后在 调试源文件 下可以看到具体路径。 二 按照路径我们进入 include 文件夹 并在里面新建文件夹 bits 进入后再添加头文件 stdc++.h (可以在桌面创建 文本文档 并把头文件的内容复制进去,再改一下文件名,头文件的内容我会放在最后) 三 按照上面的步骤操作后,重启VS进入项目,或许有些人(我就是其一)会发现VS依然显示无法打开<bits/stdc++.h>这个头文件,在经过一番查阅之后,问题出现在对 stdc++.h重命名这步上。在win10里,文件名的后缀默认是隐藏的,所以下面给出具体解决方案(要是一切运行正常的同学就可以跳过这一步了) 1.首先按照之前找到的路径进入 include 将光标移动到我们新建的文件夹 bits 上并单击,上方会出现窗口,然后我们继续点击 查看,进入一下页面 然后勾选 文件拓展名 就可以了,再进入 bits 就可以看到文件的后缀,在重新进行修改为 stdc++.h就可以了,之后重启VS就大功告成了 /下面是给大家找到的头文件的内容/// ``` // C++ includes used for precompiling -*- C++ -*- // Copyright (C) 2003-2013 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 // <Licenses - GNU Project - Free Software Foundation>. /** @file stdc++.h * This is an implementation file for a precompiled header. */ // 17.4.1.2 Headers // 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 ``` 直链下载:https://drive.skyw.cc/down.php/f147b4e17e395dfb6f95522903bc8a32.h ———————————————— 版权声明:本文为CSDN博主「阿旭啊_」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。 原文链接:https://blog.csdn.net/m0_64744234/article/details/122643525 Last modification:March 23, 2023 © Allow specification reprint Like 如果觉得我的文章对你有用,请随意赞赏