是否存在预处理'AND'指令

saz*_*azr 0 c-preprocessor preprocessor-directive

是否有Preproccessor AND指令?如果不是,你会怎么建议我解决以下任务?

#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
Run Code Online (Sandbox Code Playgroud)

Yu *_*Hao 10

你可以defined像这样使用:

#if defined(INSTALL_V8) && defined(INSTALL_V9) && defined(INSTALL_V10)
Run Code Online (Sandbox Code Playgroud)