// ----------
// Assert.c++
// ----------

/*
Turn off assertions with NDEBUG
% g++ -DNDEBUG ...
#define NDEBUG
*/

#include <cassert>  // assert
#include <iostream> // cout, endl

int main () {
    using namespace std;
    cout << "Assert.c++" << endl;

    int i = 2;
    ++i;
    assert(i == 2);

    cout << "Done." << endl;
    return 0;}

/*
Assert.c++
Assertion failed: (i == 2), function main, file Assert.c++, line 19.
*/


syntax highlighted by Code2HTML, v. 0.9.1