导航

2012年8月19日

摘要: 转自http://www.cnblogs.com/ggzss/archive/2011/08/18/2145017.htmlassert宏的原型定义在<assert.h>中,其作用是如果它的条件返回错误,则终止程序执行,原型定义:#include <assert.h>void assert( int expression ); assert的作用是现计算表达式 expression ,如果其值为假(即为0),那么它先向stderr打印一条出错信息,然后通过调用 abort 来终止程序运行。请看下面的程序清单badptr.c:#include <stdio.h> 阅读全文

posted @ 2012-08-19 09:05 vivi_wind 阅读(316) 评论(0) 推荐(0)