Saturday 22 January 2011

# error directive in c



Syntax : #error



If compiler compiles this line then it shows a compiler fatal error i.e it only issue an error message and this error message includes . i.e it only issue an error message and this error message includes .

Example :




#include

#ifndef __MATH_H

#error First include then compile

#else

int main(){

    float a,b=25;

    a=sqrt(b);

    printf("%f",a);

   

No comments:

Post a Comment