size_t size = std::numeric_limits< unsigned long >::max();在vc7.1下编译老是报下面的错误:
error C2589: “(” : “::”右边的非法标记
error C2059: 语法错误 : “::”哪位高手解答一下,谢谢!!!
error C2589: “(” : “::”右边的非法标记
error C2059: 语法错误 : “::”哪位高手解答一下,谢谢!!!
我用的stl是stlport4.6.2的库
'identifier' : illegal token on right side of '::'The token on the right side of the scope resolution operator (::) was not legal.Only a member of a class (or structure or union) can be on the right side of the scope resolution operator if a class name is on the left side. Otherwise, any global identifier can be on the right side.
解决方法:在工程设置里添加一个预定义宏
Project setting ——>C/C++——>Category——>PreProcessor——>PreProcessor Definitions(此处添加预定义编译开关 NOMINMAX)