我在从c++参考书中看到assert的使用,但是在mfc中调用的时候总是显示没有定义,请问我应该怎么用。

解决方案 »

  1.   

    MFC中用宏重新定义了ASSERT
    用ASSERT就可以了
      

  2.   

    我用了大写ASSERT,还是"undeclared identifier"错误。
      

  3.   

    如果包含MFC的h文件,ASSERT肯定可以用
      

  4.   

    In the Release version of MFC, ASSERT does not evaluate the expression and thus will not interrupt the program. If the expression must be evaluated regardless of environment, use the VERIFY macro in place of ASSERT.Note   This function is available only in the Debug version of MFC.ntddk.h