Error directive - cppreference.com

##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# Error directive

From cppreference.com
< cpp‎ | preprocessor

Shows given message and renders program ill-formed.

### [edit] Syntax

`#error` error_message |  |

### [edit] 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.

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/preprocessor/error&oldid=72165"