Study of #error directive.

#include <stdio.h>

#define LINUX

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

#ifdef DOS
printf( "\nCode for DOS" );
#elif defined LINUX
printf( "\nCode for LINUX" );
#else
#error "You must set the operating system"
#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