且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在#ifdef中添加“或”条件

更新时间:2023-12-02 20:08:16

#if defined(CONDITION1) || defined(CONDITION2)

应该有效。 :)

#ifdef 的输入方式少一些,但在更复杂的条件下效果不佳

#ifdef is a bit less typing, but doesn't work well with more complex conditions