Use of the assert() debugging macro - C++ Preprocessor

C++ examples for Preprocessor:Macro

Description

Use of the assert() debugging macro

Demo Code

#include <cassert>  // Contains the macro
using namespace std;
int main() {//from  w  w w .j ava  2 s.  c  o m
   int i = 100;
   assert(i != 100); // Fails
}

Result


Related Tutorials