Problem calling std::max

后端 未结 2 1048
[愿得一人]
[愿得一人] 2020-12-12 22:21

I compiled my bison-generated files in Visual Studio and got these errors:

...\\position.hh(83): error C2589: \'(\' : illegal token on right side of \

2条回答
  •  南笙
    南笙 (楼主)
    2020-12-12 23:05

    Define the NOMINMAX symbol at the top of your source, before you include any headers. Visual C++ defines min and max as macros somewhere in windows.h, and they interfere with your use of the corresponding standard functions.

    #define NOMINMAX
    

提交回复
热议问题