I want to use or in a preprocessor #ifdef directive. I've tried using the || operator but it hasn't worked. How can I do this?
            Asked
            
        
        
            Active
            
        
            Viewed 146 times
        
    -3
            
            
         
    
    
        Serket
        
- 3,785
- 3
- 14
- 45
2 Answers
1
            
            
        You can't.
#ifdef COND is short for #if defined(COND). It has no way to combine conditions.
But, you don't need to use #ifdef! If you write it out in full, you can make use of all the operators you need:
#if defined(COND1) || defined(COND2)
 
    
    
        Asteroids With Wings
        
- 17,071
- 2
- 21
- 35
