Preprocessor: error : error « Development « C / ANSI-C






Preprocessor: error


#include <stdio.h>

int main(void)
{
  int i;

  i = 1;

#error This is an error message.

  printf("%d", i); /* this line will not be compiled */

  return 0;
}


           
       








Related examples in the same category

1. Print error message: how to use perror
2.Reset error indicators: writing errors
3. Get pointer to error message string: how to use strerror
4.Define Macro for string variable
5.Preprocessor: line