定义了#define NDEBUG ,assert 还生效 的处理方法
正常使用的话,必须导入 #include <assert.h>,这样才能在后面使用断言
如果要使断言失效,就必须在assert.h前面新增 NDEBUG,注意!!!!必须紧随上面新增,跨行都不行
#define NDEBUG
#include <assert.h>
正常使用的话,必须导入 #include <assert.h>,这样才能在后面使用断言
如果要使断言失效,就必须在assert.h前面新增 NDEBUG,注意!!!!必须紧随上面新增,跨行都不行
#define NDEBUG
#include <assert.h>