Both these are used to make sure that an expression or statement in VC++ is executed properly.
In the debug version, both have no difference at all. But if you compile these statements in the release version, the one with ASSERT won’t be executed at all, but the one with VERIFY will work normally.
CString StrMyString(“This is my string”);
ASSERT ( StrMyString.Erase(0,2));
will not cause the first two characters to be erased, if compiled in the release version.
VERIFY (StrMyString.Erase(0,2)) ;
will cause the first two characters to be erased.