std::numeric_limits<int>::max() error C2589: '(' : illegal token on right side of '::' 解决办法
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)(); 即可。
std::numeric_limits<int>::max() error C2589: '(' : illegal token on right side of '::' 解决办法的更多相关文章
- VS2017使用assimp 5.0.0 error C2589: '(' : illegal token on right side of '::' 解决办法
坑爹微软Sucks Again. assimp 终于更新到了5.0.0并且支持GLTF2格式,包含动画正确解析,在viewer中也能看到正确结果,真他喵的不容易,然后拿来编译完到自己项目里用,就出这玩 ...
- MySQL: Starting MySQL….. ERROR! The server quit without updating PID file解决办法
MySQL: Starting MySQL….. ERROR! The server quit without updating PID file解决办法 1 问题 [root@localhost m ...
- Wincap安装出现“error opening file for writing wpcap.dll”之解决办法
Wincap安装出现"error opening file for writing wpcap.dll"之解决办法 安装Wireshark时,一直出现下面的错误,选择忽略这个错误, ...
- github上传时出现error: src refspec master does not match any解决办法
github上传时出现error: src refspec master does not match any解决办法 这个问题,我之前也遇到过,这次又遇到了只是时间间隔比较长了,为了防止以后再遇到类 ...
- Centos下安装apahce的configure: error: APR not found. Please read the documentation解决办法
今天从Apache官网上http://httpd.apache.org/下载httpd web服务器,由于我的虚拟机上之前安装过,我先yum remove httpd进行卸载,然后重新安装.我采用的是 ...
- 转 configure: error: Cannot find ldap libraries in /usr/lib 解决办法
今天在centos 6.2 64位版本上安装LNMP,config php的时候出现下面错误而退出 configure: error: Cannot find ldap libraries in /u ...
- 转 Centos下安装apahce的configure: error: APR not found. Please read the documentation解决办法
转自: http://www.cnblogs.com/Anker/p/3355573.html 今天从Apache官网上http://httpd.apache.org/下载httpd web服务器,由 ...
- (转)git clone: error: RPC failed; result=18, HTTP code = 200 解决办法
git clone: error: RPC failed; result=18, HTTP code = 200 解决办法 分类: git2013-09-01 17:03 10753人阅读 评论(2) ...
- Linux学习笔记之passwd:Authentication token manipulation error_错误的解决办法
如果在linux中,不管是root用户还是普通用户登录后,修改自己的密码,出现—passwd:Authentication token manipulation error—错误的解决办法: root ...
随机推荐
- Lucene技术杂谈
Lucene教程 1 lucene简介 1.1 什么是lucene Lucene是一个全文搜索框架,而不是应用产品.因此它并不像www.baidu.com 或者google Desktop那么 ...
- java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
在使用Fragment的过程中,常常会遇到在Activity的onSaveInstanceState方法调用之后,操作commit或者popBackStack而导致的crash. 因为在onSaveI ...
- js获取当前url参数
//抓取url参数 function GetRequest() { var url = location.search; //获取url中"?"符后的字串 var theReque ...
- PHP 学习笔记 (一)
1. 在PHP中设置最长执行时间: PHP中的PHP.ini文件中,max_execution_time 项指定了PHP最长执行时间,默认是30秒.有两种方案可以对其进行修改: 1. 直接在PHP.i ...
- Pintos-斯坦福大学操作系统Project详解-Project1
转载请注明出处. 前言: 本实验来自斯坦福大学cs140课程,只限于教学用途,以下是他们对于Pintos系统的介绍: Pintos is a simple operating system fra ...
- Java学习----finally块
public class Test { String x; public static void main(String[] args) { Test test = new Test(); try { ...
- css字体大小设置em与rem的区别
em 单位em是相对于父元素的,如果父元素没有设置字体大小,那就会追溯到body. 比如 如果我在box_text的父元素box加了一个字体大小 那么body的8px就会被box_text的父元 ...
- Fizz Buzz
class Solution { public: /** * param n: As description. * return: A list of strings. */ vector<st ...
- Cloudera Impala 之 ORDER BY without LIMIT currently not supported
ERROR: NotImplementedException: ORDER BY without LIMIT currently not supported impala中order by 需要l ...
- android调试bug集锦 onActivityResult立即返回,并且被CANCEL
症状: 在使用startActivityForResult调用照相机或者选择图片的时候,总是onActivityResult立马返回,resultCode=0 CANCEL. startActivit ...