How do I check OS with a preprocessor directive?

前端 未结 16 1541
星月不相逢
星月不相逢 2020-11-22 13:53

I need my code to do different things based on the operating system on which it gets compiled. I\'m looking for something like this:

#ifdef OSisWindows
// do         


        
16条回答
  •  天涯浪人
    2020-11-22 14:10

    I did not find Haiku definition here. To be complete, Haiku-os definition is simple __HAIKU__

提交回复
热议问题