c++ assert

#include<iostream>
#include <assert.h>
using namespace std;
int main()
{
    int a = 0;
    assert(a == 0);//当其不满足时触发
    getchar();
    return 0;
}
我以为是满足时触发,结果错了

 

posted @ 2014-08-27 13:11  zzyoucan  阅读(148)  评论(0编辑  收藏  举报