warning C4003 and errors C2589 and C2059 on: x = std::numeric_limits::max();

前端 未结 6 1112
梦毁少年i
梦毁少年i 2020-12-04 21:28

This line works correctly in a small test program, but in the program for which I want it, I get the following compiler complaints:

#include 

         


        
6条回答
  •  Happy的楠姐
    2020-12-04 21:58

    Some other header file is polluting the global name space with a max macro. You can fix that by undefining the macro:

    #undef max
    x = std::numeric_limits::max();
    

提交回复
热议问题