万能头为什么万能

发布时间 2023-03-31 16:20:13作者: 永昼

叫做文件包含命令,用来引入对应的头文件(.h文件)。#include 也是编程预处理命令的一种

#include   用来引入头文件

万能头       #include<bits/stdc++.h>

为什么被叫做万能头

目前这个万能头文件包括了c++中所有的头文件

#include <iostream>           

输入输出流头文件,有了他才可以使用  cin  cout  等等,一般在c++

#include <cstdio>

输入输出流头文件,一般使用在C语言中

#include <fstream>

c++   进行文件操作

#include <algorithm>

详细函数见下,一般是字符运算等

(关于c++#include<algorithm>的用法,带讲解,包含c++11。(一)_c++11 定义include_systemyff的博客-CSDN博客

#include <cmath>

一般包含数学的函数   sin cos 等等

 C++ #include<cmath> 常用函数_#include <cmath>_只惠摸鱼的博客-CSDN博客

#include <deque>

 C++笔记 16 (STL常用容器 - deque)_细双的博客-CSDN博客

#include <vector>

c++中的#include<vector>是用来引入vector容器的头文件。vector是一种动态数组,可以在运行时动态地增加或减少其大小。它提供了许多有用的函数,例如push_back()、pop_back()、size()等,使得对数组的操作更加方便

【c++】 vector用法详解_vector c++ 用法_LeeMooq的博客-CSDN博客

#include<vector> 的用法_include vector_woyaottk的博客-CSDN博客

#include <queue>

C++-queue头文件-队列常用函数-#include<queue>新手入门_c++队列函数_菜菜小硕的博客-CSDN博客

#include <string>   各种各样的字符串处理函数

 #include<string> #include<cstring>_#include<cstring>_BHS_的博客-CSDN博客

#include <map>

(17条消息) #include<map>简介_#include <map>_wardseptember的博客-CSDN博客

#include <stack>

(17条消息) #include<stack> 主要用法_#include<stack>_woyaottk的博客-CSDN博客

#include <set>

(17条消息) C++中set用法详解_byn12345的博客-CSDN博客

函数直接调用,不用再写单独的头文件,非常方便