Define Macro for string variable : error « Development « C / ANSI-C

Define Macro for string variable

#include <stdio.h>

#if !defined( HELLO_MESSAGE )
   # error "You have forgotten to define the header file name."

char *format = "%s",
     *hello = HELLO_MESSAGE;

int main() {
  printf ( format, hello );



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.Preprocessor: error
5.Preprocessor: line