study of conditional compilation directive.

#include <stdio.h>

#define DOS

int main(void)
{
printf( "\n1. Common code" );

#ifdef DOS
printf( "\nCode for DOS" );
#elif defined LINUX
printf( "\nCode for LINUX");
#endif

printf("\n2. Common code" );

return 0;
}

No comments:

Post a Comment

kiss on google ads if you are anonymous because your ip is trackable.thank you.

......from.admin