Reputation: 794
How to make that when I define both instructions at the same time I will get the compilation error? Here I want error
#define ENG
#define POL
#if defined POL
#if defined ENG
Here not
#define ENG
//#define POL
#if defined POL
#if defined ENG
Upvotes: 4
Views: 185
Reputation: 62323
#if defined( ENG ) && defined( POL )
#error You can't define both!
#endif
Upvotes: 8