??? 02/14/06 19:56 Read: times |
#109982 - #ifdef vs #if defined() Responding to: ???'s previous message |
#if defined() gives you two things that you can't do with #ifdef:
1. Logical expressions, as Abhishek suggested; eg #if defined(A) && defined(B) 2. Possibility of 'elif' clause; eg, #if defined(A) // stuff #elif defined(B) // other stuff #else #error "You must define either A or B!" #endif |
Topic | Author | Date |
C preprocess question | 01/01/70 00:00 | |
defined() if supprorted | 01/01/70 00:00 | |
in a much more complex environment | 01/01/70 00:00 | |
#ifdef vs #if defined() | 01/01/70 00:00 | |
problem solved![]() | 01/01/70 00:00 |