assert用法
#include <iostream>
// 注意:如果想取消使用assert,NDEBUG必须在include <cassert>前
// 或者在编译时候加,g++ assert用法.cc -DNDEBUG
// #define NDEBUG
#include <cassert>
using namespace std;
int main(int argc, const char** argv) {
assert(argc == 2);
cout<<"---------------"<<endl;
return 0;
}

浙公网安备 33010602011771号