关于 C 中的 assert.h 头文件的说明

Clarification regarding assert.h header file in C

我正在使用一些使用 assert.h 头文件的 C 语言的开源代码

#include <assert.h>

我想我知道 assert 的用途以及为什么它在程序中,即它是一个用于调试目的的宏,它测试某些条件,如果不满足条件可能会中止程序。

我的问题:在正确的代码中找不到 assert.h 头文件。这让我很困惑。 assert.h 是一个通用的头文件,还是这个是为每个程序单独编写的?

assert.h(或 C++ 中的 cassert)在标准库中,类似于 <math.h><stdlib.h>。这些头文件由编译器提供,并自动包含在您的包含路径中。

http://en.wikipedia.org/wiki/C_standard_library