语法:
#include <cassert> assert( exp );
assert() 宏用来测试错误。如果exp值为零,assert() 向标准错误stderr写信息并退出程序。如果定义了宏 NDEBUG,assert() 宏会被忽略。
相关主题: abort