Does the #error directive work in Microsoft Visual C++? Is, so what is the syntax. I found this sample code:
#include <stdio.h>
#if MyVAL != 2
#error MyVAL must be defined to 2
#endif
int main()
{
return 0;
}
And I get the error:
fatal error C1189: #error : MyVAL must be defined to 2
From what I have seen, usual syntax is as seen above, but Windows Visual Studios 2010, does not like this? Is there a way to implement this in MSVS 2010. Thank you!
So it is totally a dumb question. As the comments indicate, the error I received is exactly what I was supposed to.