W3cubDocs

/C++

Error directive

Shows given message and renders program ill-formed.

Syntax

#error error_message

Explanation

After encountering #error directive, diagnostic message error_message is shown and the program is rendered ill-formed (the compilation is stopped).

error_message can consist of several words not necessarily in quotes.

See also

C documentation for Error directive

© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
http://en.cppreference.com/w/cpp/preprocessor/error