If else preprocessors
-----------------------code------------------------------
#include <iostream.h>
#define DAY 0
#define NIGHT 1
#define NOW DAY
#define ISNIGHT x ((x)==NIGHT)
int main( void )
{
#if ISNIGHT(1)
std:cout << "Good Night World" << endl;
#else
std:cout << "Hello World" << endl;
No comments:
Post a Comment