Diff between Assert and verify?
Assert : used to test a piece of code for its validity when you are running in Debug version. Its ignored completely in release version Verify : used to test a piece of code in both release and debug mode. In debug mode VERFIY macro evaluates the argument and if the result is 0 then it prints the diagnostic message and halts the program If its non-zero it does nothing. In release mode it doesnt halt the program even it fails. Assert: basically it’s a way of testing a piece of code is valid. This is accomplished using the ASSERT macro. This macro is valid only when you are running a debug version of your program; it’s ignored completely under release. Example : CWnd* pWnd = GetParent(); ASSERT(pWnd != NULL); If you ran this, and for some reason pWnd was indeed NULL, you’d get a dialog box The assertion message box contains the name of the source file and the line number at which the assertion failed. The main causes of assertion failures are memory corruption and invalid parameters bein