How do I avoid name collision with macros defined in Windows header files?

后端 未结 8 1362
一向
一向 2020-12-10 11:24

I have some C++ code that includes a method called CreateDirectory(). Previously the code only used STL and Boost, but I recently had to include

8条回答
  •  粉色の甜心
    2020-12-10 11:38

    #pragma push_macro("CreateDirectory")
    

    If nothing works, instead of renaming you could use your own namespace for your functions.

提交回复
热议问题