Determine if Linux or Windows in C++

后端 未结 6 1940
忘了有多久
忘了有多久 2021-02-04 00:40

I am writing a cross-platform compatible function in C++ that creates directories based on input filenames. I need to know if the machine is Linux or windows and use the appropr

6条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-04 01:04

    predef.sourceforge.net is a comprehensive collection of all kinds of MACROs that identify compilers/operating systems and more. (linking directly to the operating system sub-site)

提交回复
热议问题