鱼C论坛

 找回密码
 立即注册
查看: 2931|回复: 8

[吹水] 徒手找到 stdc++.h : 藏得挺深的

[复制链接]
发表于 2023-1-11 14:19:15 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
本帖最后由 额外减小 于 2023-1-11 15:52 编辑

使用dev-c++编程时,将光标移至头文件名处,会显示出路径。按ctrl+click可以查看内容。
然而,我在写c++的代码时,引用
  1. #include <bits/stdc++.h>
复制代码
却一直没有显示。
(我也不知道是怎么回事,有大佬可以解释吗)

最近我在Dev-C++的文件夹里随便翻找时,竟意外找到了这个头文件!
进去一看,还真是包罗万象啊。。。
  1. // C++ includes used for precompiling -*- C++ -*-

  2. // Copyright (C) 2003-2014 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
复制代码


好像真的把平常用到的库函数都包含进去了。

最后附上找到的路径。挺长的,是吧
  1. C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++\x86_64-w64-mingw32\32\bits\stdc++.h
复制代码
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2023-1-11 15:13:56 | 显示全部楼层
谢谢楼主撒币
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2023-1-11 15:14:18 | 显示全部楼层
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2023-1-11 15:40:22 | 显示全部楼层
ctrl + f 不行吗  ?
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2023-1-11 15:41:18 | 显示全部楼层
花好s月圆 发表于 2023-1-11 15:40
ctrl + f 不行吗  ?

我试试
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2023-1-11 15:42:07 | 显示全部楼层
感谢楼主撒币
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2023-1-11 15:43:08 | 显示全部楼层

回帖奖励 +1 鱼币

  1. sh-5.1$ find /usr/include -name 'stdc++.h'
  2. /usr/include/c++/12.2.0/x86_64-pc-linux-gnu/32/bits/stdc++.h
  3. /usr/include/c++/12.2.0/x86_64-pc-linux-gnu/bits/stdc++.h
  4. sh-5.1$
复制代码
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2023-1-11 15:43:17 | 显示全部楼层
1.png
我试了下,但不知道怎么用
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2023-1-11 15:44:22 | 显示全部楼层
额外减小 发表于 2023-1-11 15:43
我试了下,但不知道怎么用
  1. sh-5.1$ find /usr/include -name 'stdio.h'
  2. /usr/include/bits/stdio.h
  3. /usr/include/stdio.h
  4. /usr/include/marisa/stdio.h
  5. /usr/include/c++/12.2.0/tr1/stdio.h
  6. /usr/include/bsd/stdio.h
  7. sh-5.1$
复制代码

评分

参与人数 1荣誉 +1 收起 理由
额外减小 + 1 鱼C有你更精彩^_^

查看全部评分

小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2025-7-1 13:21

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表