trainingtrains Logo

91-9990449935

 0120-4256464

C #error

The #error preprocessor directive indicates error. The compiler gives fatal error if #error directive is found and skips further compilation process.

C #error example

Let's see a simple example to use #error preprocessor directive.

Output:

Compile Time Error: First include then compile

But, if you include math.h, it does not gives error.

Output:

2.645751
Next TopicC #pragma