- C 标准库—— string.h
- C 标准库 —— time.h
- C 标准库 —— limits.h
- C 标准库 —— stdio.h
- C 标准库—— stdlib.h(包括 rand srand 的实现)
- C 标准库——<cmath>/<math.h>
- C 标准库—— assert.h
头文件<assert.h>的唯一目的就是提供宏assert的定义;
#include <assert.h>
assert(idx>=0 && idx < sizeof a/sizeof a[0]);
/* a[idx] is now safe*/
本文介绍了C标准库中多个核心头文件的功能与用途,包括string.h、time.h、limits.h等,并详细展示了assert.h中assert宏的使用方法。
3429

被折叠的 条评论
为什么被折叠?



