int max =std::numeric_limits<int>::max();
     根据错误提示:

f:\code\cpp\webspider\main.cpp(47) : warning C4003: not enough actual parameters for macro 'max'
f:\code\cpp\webspider\main.cpp(47) : error C2589: '(' : illegal token on right side of '::'
f:\code\cpp\webspider\main.cpp(47) : error C2059: syntax error : '::'
原因:STL的numeric_limits::max()和VC6 min/max 宏冲突问题

问题应该是以上两个头文件的宏定义出现了冲突。

解决:通过括号“()”来避免预编译器报错。int max = (std::numeric_limits<std::streamsize>::max)();   即可。

相关文章:

  • 2021-07-09
  • 2021-06-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-14
  • 2022-01-18
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-03
  • 2022-02-16
  • 2022-12-23
相关资源
相似解决方案