no.1
#include < stdio.h >
int main( int , char ** )
{
printf( " This fake error is in %s on line %d\n " , __FILE__, __LINE__);
return 0 ;
}
no.2
#define error(x) my_error(__FILE__, __LINE__, x)
void my_error(const char* file, const int line, const char* msg)
{
printf("Error at %s:%d: %s\n", file, line, msg);
}
int main()
{
printf("hello\n");
error("a fetal error");
return 0;
}