assert [C++ Reference]
Keywords: c,other,assert
Date: 2008-10-14T15:42:02-0700

[[assert]]
C++ Reference
Translations of this page?:

- en
- br-pt
- cn
- fr
- it
- jp
- pl
- ru
- tr

## assert

Syntax:

        #include <cassert>
        assert( exp );

The assert() macro is used to test for errors. If exp evaluates to zero, assert () writes information to stderr and exits the program. If the macro NDEBUG is defined, the assert() macros will be ignored.

Related Topics: abort

Edit this page • Old revisions
• • • Login • Index • Recent changes • RSS • cc •