wolflion

c library

#include <cassert> 旗下只有assert()一个函数
cassert
defines one macro that can be used as a standard debugging tool
详细解释:http://www.cplusplus.com/reference/clibrary/cassert/assert/

#include <stdio.h>
#include 
<assert.h>

int main()
{

    FILE  
*datafile;
    datafile 
= fopen("file.dat","r");
    assert(datafile);

    fclose(datafile);
    
return 0;
}


 

posted on 2009-12-28 10:43 lionel 阅读(119) 评论(0)  编辑 收藏 引用


只有注册用户登录后才能发表评论。
网站导航:   博客园   博客园最新博文   博问   管理