2013-08-21 3 views
0

Existe-t-il une directive «Prépros» AND? Si non, comment suggéreriez-vous que je m'attaque à la tâche suivante?Existe-t-il une directive «ET» sur les préprofesseurs?

#define INSTALL_V8 
#define INSTALL_V9 
#define INSTALL_V10 // Using preprocessor directives and not static variables to 
// avoid packaging unnecessary code into the application/installer 

#ifdef INSTALL_V8 AND INSTALL_V9 AND INSTALL_V10 
    #define CHECK_BOX_STRT_Y 60 // move the start y up so we have room to fit 3 checkboxes in the window 
#else 
    #define CHECK_BOX_STRT_Y 80 // place 1st checkbox in middle of window 
#endif 

Répondre

10

Vous pouvez utiliser defined comme ceci:

#if defined(INSTALL_V8) && defined(INSTALL_V9) && defined(INSTALL_V10) 
4

imbriquer les conditions

#ifdef CONDITION1 
# ifdef CONDITION2 
# endif 
#endif 
Questions connexes