首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

assert有关问题 求详解 谢过

2012-03-14 
assert问题 求详解 谢过#include cassertusing namespace std#ifdef NDEBUG#define assert(cond) ((voi

assert问题 求详解 谢过
#include <cassert>
using namespace std;

#ifdef NDEBUG
#define assert(cond) ((void)0)
#else
void assertImpl(const char*, const char*, long);
#define assert(cond) ((cond) ? (void)0 : assertImpl(?,?,?))
#endif

int main(int argc,char* args[]){
int i=3;
assert(i == 3);//这里怎么提示里面要输入个表达式呀
return 0;
}

[解决办法]
assert
Evaluates an expression and when the result is FALSE, prints a diagnostic message and aborts the program.

[解决办法]
http://topic.csdn.net/u/20111104/12/c18e3061-2246-48a7-b127-6bcb966c11b7.html

热点排行