Go back to Richel Bilderbeek's homepage.

Go back to Richel Bilderbeek's C++ page.

 

 

 

 

 

(C++) Preprocessor

 

The preprocessor performs modifications (especially macro's) to source code, before compiling takes place.

 

The code below shows that the preprocessor directive '#define NDEBUG' lets the preprocessor remove all assert statements.

 

#define NDEBUG
#include <cassert>

int main()
{
  assert(1==2 && "Assume nonsense");
}

 

 

 

 

 

Go back to Richel Bilderbeek's C++ page.

Go back to Richel Bilderbeek's homepage.

 

Valid XHTML 1.0 Strict