跳到正文

算法·理论

浅谈头文件与#include

Bonjour666约 2 分钟
原文
文章信息与版本

文章信息

收录
2025年12月26日
更新
2025年12月26日
篇幅
约 2 分钟

版本

  1. v2当前
  2. v1

头文件是c++语言的一个重要部分(这里省略我花3小时的论文结果)

头文件各司其职:

有管输入输出的,有关界面的,有管数学公式的…

常用的系统自带头文件:

C++
#include <algorithm>
#include <bitset>
#include <cctype>
#include <cerrno>
#include <clocale>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <limits>
#include <list>
#include <map>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <utility>
#include <vector>
#include <cwchar>
#include <cwctype>

万能头:

比赛不让用

C++
#include <bits/stdc++.h>

详细介绍

原文