摘录→C++头文件大全
https://blog.csdn.net/sinolzeng/article/details/44920285
C语言常用头文件
1:#include
float.h提供了浮点型的范围和精度的宏,没有类型和函数的定义,一般用于数值分析。
https://baike.baidu.com/item/float.h/8210146?fr=aladdin
2:#include
一般用c++里的#include< iostream>
3:#include
limits.h专门用于检测整型数据数据类型的表达值范围。
#include
#include
main()
{
printf("%d,%d\n", INT_MAX, INT_MIN);
getchar();
}
4:#include
常用sqrt函数,pow函数,fabs,abs函数等
5:#include
stdlib.h头文件包括的常用的函数有malloc()、calloc()、realloc()、free()、system()、atoi()、atol()、rand()、srand()、exit()等等。
6:#include
参考博客详细讲解:https://www.cnblogs.com/haore147/p/3647555.html
7:#include
参考博客详细讲解:https://www.cnblogs.com/haore147/p/3647579.html
c++常用头文件
1:#include
参考博客详细讲解:https://blog.csdn.net/ruibin_cao/article/details/83004968
2:#include
3:#include
参考博客详细讲解:https://blog.csdn.net/wardseptember/article/details/80571363
4:#include
参考博客详细讲解:https://blog.csdn.net/seadplus/article/details/7802346
5:#include
6:#include
如在SPFA算法最短路中需用到队列
参考博客详细讲解:https://www.cnblogs.com/xuning/p/3321733.html
扩展:priority_queue 优先队列
参考博客详解:https://www.cnblogs.com/Deribs4/p/5657746.html
7:#include
begin()
,返回set容器的第一个元素end()
,返回set容器的最后一个元素clear()
删除set容器中的所有的元素empty()
判断set容器是否为空max_size()
,返回set容器可能包含的元素最大个数size()
,返回当前set容器中的元素个数rbegin
,返回的值和end()相同rend()
,返回的值和rbegin()相同
8:#include
stack 的基本操作有:
入栈,如例:s.push(x);
出栈,如例:s.pop();注意,出栈操作只是删除栈顶元素,并不返回该元素。
访问栈顶,如例:s.top()
判断栈空,如例:s.empty(),当栈空时,返回true。
访问栈中的元素个数,如例:s.size()。
最后需要加上这个语句: using namespace std;