#if defined(CREDIT) credit(); #elif defined(DEBIT) debit(); #else printerror(); #endif
如果定义了宏CREDIT,那编译的时候就会编译credit();如果定义了宏DEBIT,那就编译debit();
如果2个宏都没有定义,那就编译printerror();
#if defined(CREDIT) credit(); #elif defined(DEBIT) debit(); #else printerror(); #endif
如果定义了宏CREDIT,那编译的时候就会编译credit();如果定义了宏DEBIT,那就编译debit();
如果2个宏都没有定义,那就编译printerror();