当前位置:   article > 正文

vs2022 错误(活动) E1696 无法打开 源 文件 “bits/stdc++.h“解决办法_e1696无法打开源文件

e1696无法打开源文件

一、创建stdc++.h的头文件

随便找一个项目->添加->新建项->头文件->命名为stdc++.h->添加

二、复制下述代码->保存

  1. // C++ includes used for precompiling -*- C++ -*-
  2. // Copyright (C) 2003-2017 Free Software Foundation, Inc.
  3. //
  4. // This file is part of the GNU ISO C++ Library. This library is free
  5. // software; you can redistribute it and/or modify it under the
  6. // terms of the GNU General Public License as published by the
  7. // Free Software Foundation; either version 3, or (at your option)
  8. // any later version.
  9. // This library is distributed in the hope that it will be useful,
  10. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. // GNU General Public License for more details.
  13. // Under Section 7 of GPL version 3, you are granted additional
  14. // permissions described in the GCC Runtime Library Exception, version
  15. // 3.1, as published by the Free Software Foundation.
  16. // You should have received a copy of the GNU General Public License and
  17. // a copy of the GCC Runtime Library Exception along with this program;
  18. // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
  19. // <http://www.gnu.org/licenses/>.
  20. /** @file stdc++.h
  21. * This is an implementation file for a precompiled header.
  22. */
  23. // 17.4.1.2 Headers
  24. // C
  25. #ifndef _GLIBCXX_NO_ASSERT
  26. #include <cassert>
  27. #endif
  28. #include <cctype>
  29. #include <cerrno>
  30. #include <cfloat>
  31. #include <ciso646>
  32. #include <climits>
  33. #include <clocale>
  34. #include <cmath>
  35. #include <csetjmp>
  36. #include <csignal>
  37. #include <cstdarg>
  38. #include <cstddef>
  39. #include <cstdio>
  40. #include <cstdlib>
  41. #include <cstring>
  42. #include <ctime>
  43. #if __cplusplus >= 201103L
  44. #include <ccomplex>
  45. #include <cfenv>
  46. #include <cinttypes>
  47. #include <cstdalign>
  48. #include <cstdbool>
  49. #include <cstdint>
  50. #include <ctgmath>
  51. #include <cwchar>
  52. #include <cwctype>
  53. #endif
  54. // C++
  55. #include <algorithm>
  56. #include <bitset>
  57. #include <complex>
  58. #include <deque>
  59. #include <exception>
  60. #include <fstream>
  61. #include <functional>
  62. #include <iomanip>
  63. #include <ios>
  64. #include <iosfwd>
  65. #include <iostream>
  66. #include <istream>
  67. #include <iterator>
  68. #include <limits>
  69. #include <list>
  70. #include <locale>
  71. #include <map>
  72. #include <memory>
  73. #include <new>
  74. #include <numeric>
  75. #include <ostream>
  76. #include <queue>
  77. #include <set>
  78. #include <sstream>
  79. #include <stack>
  80. #include <stdexcept>
  81. #include <streambuf>
  82. #include <string>
  83. #include <typeinfo>
  84. #include <utility>
  85. #include <valarray>
  86. #include <vector>
  87. #if __cplusplus >= 201103L
  88. #include <array>
  89. #include <atomic>
  90. #include <chrono>
  91. #include <condition_variable>
  92. #include <forward_list>
  93. #include <future>
  94. #include <initializer_list>
  95. #include <mutex>
  96. #include <random>
  97. #include <ratio>
  98. #include <regex>
  99. #include <scoped_allocator>
  100. #include <system_error>
  101. #include <thread>
  102. #include <tuple>
  103. #include <typeindex>
  104. #include <type_traits>
  105. #include <unordered_map>
  106. #include <unordered_set>
  107. #endif

三、把stdc++.h文件复制到include文件夹中新建的bits文件夹

不会找stdc++.h可以试试右键stdc++.h->打开所在文件夹

同样,不会找include文件夹可以试试,随便在一个项目中输入

#include<iostream>

右键iostream

右键右上角iostream

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小惠珠哦/article/detail/934122
推荐阅读
相关标签
  

闽ICP备14008679号