#include <iostream>
#define DEBUG
#if defined ( DEBUG )
#define DEBUG_CODE( code_to_put_into_source ) { code_to_put_into_source }
#else
#define DEBUG_CODE( code_to_put_into_source )
#endif
int main()
{
#if defined ( DEBUG )
cout << "\nDEBUG is defined -> here comes the debugging code:\n" << endl;
#else
cout << "\nDEBUG is not defined -> no debugging code :-]\n" << endl;
#endif
DEBUG_CODE
(
cerr << "This comes from the debugging macro !" << endl;
cerr << "You can use \"#define DEBUG\" in the header file, " << endl;
cerr << "or use the compiler switch \"-DDEBUG\" to change to the debuggging mode !" << endl << endl;
)
return 0;
}