How to #ifdef by CompilerType ? GCC or VC++

前端 未结 3 1915
灰色年华
灰色年华 2020-12-14 08:45

I used #ifdef Win32 for safe calls alike sprintf_s but now I want to build project with MinGW and it\'s just wrong now. I need to use #ifdef

3条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-14 09:51

    See the "Microsoft-Specific Predefined Macros" table of Visual C predefined macros

    You could check for _MSC_VER.

提交回复
热议问题