Vaughn
Junior Member level 2
How can I evaluate any expression during compile time and generate compile time error in C?
Say I have a function
Say I have a function
Code C - [expand] 1 2 3 4 5 6 7 void foo(int number){ if(number < 10){ //Do this; } else #error "Number is greater than 9 and this is compiler generated error"; }