assert()
#include
void assert( thePtrThatShouldNeverBeNull != NULL );
Assert is actually defined as a macro, not as a real function. In order to disable assertions when a program is found to work satisfactorily, defining the name NDEBUG before including
#define NDEBUG
#include
assert( d != 22); // (not compiled) This will turn all the assert() statements off (become invisible to the compiler but not to you)
No comments:
Post a Comment