Team LiB   Previous Section   Next Section
#error directive Issues an error message

#error message

The #error directive tells the preprocessor to issue an error message and mark the source file as ill-formed, just as if the programmer made a programming error that the compiler detected. You can supply any sequence of preprocessor tokens as the message, and those tokens are echoed in the error message.

Example

#if !defined(_  _cplusplus) || (_  _cplusplus < 199711L)
  #error Not a conforming C++ compiler.
#endif

See Also

#line directive

    Team LiB   Previous Section   Next Section