tags:

views:

142

answers:

1

Hi,

How can I add a 'or' condition in #ifdef ?

I have tried "

#ifdef CONDITION1 || CONDITION2

#endif

This does not work.

+20  A: 
#if defined(CONDITION1) || defined(CONDITION2)

should work. :)

#ifdef is a bit less typing, but doesn't work well with more complex conditions

jalf