Previous Section
 < Free Open Study > 
Next Section


C.1 The Header File cassert

assert(booleanExpr)

  • Argument:

A logical (Boolean) expression

  • Effect:

If the value of booleanExpr is true, execution of the program simply continues. If the value of booleanExpr is false, execution terminates immediately with a message stating the Boolean expression, the name of the file containing the source code, and the line number in the source code.

  • Function return value:

None (a void function)

  • Note:

If the preprocessor directive #define NDEBUG is placed before the directive #include <cassert>, all assert statements are ignored.



Previous Section
 < Free Open Study > 
Next Section
Converted from CHM to HTML with chm2web Pro 2.85 (unicode)