#include < iostream > #include < assert.h > using namespace std; int main() ... { assert(4>3);//断言、程序每次运行时都检查参数的是不是真,真则继续、否则报错 char* str="this is a string"; assert(str!=NULL); getchar(); return 0;}