您的位置:首页 > 其它

C Standard Library: 6 Diagnostics: <assert.h>

2013-03-21 14:30 387 查看
The assert macro is used to add diagnostics to programs:
void assert(int expression)
If expression is zero when
assert(expression)
is executed, the assert macro will print on stderr a message, such as
Assertion failed: expression, file filename, line nnn
It then calls abort to terminate execution. The source filename and line number come from the
preprocessor macros __FILE__ and __LINE__.
If NDEBUG is defined at the time <assert.h> is included, the assert macro is ignored.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: