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 ...
随机推荐
- PHP提高编程效率的方法,你知道多少呢?
PHP语言是最WEB的计算机语言,而且也是应用最广泛的语言,那么PHP对编程的影响有多大呢?下面可以去了解一下. 用单引号代替双引号来包含字符串,这样做会更快一些.因为PHP会在双引号包围的字符串中搜 ...
- [网络] C# NetHelper网络通信编程类教程与源码下载
点击下载 NetHelper.zip 主要功能如下所示 检查设置的IP地址是否正确,返回正确的IP地址 检查设置的端口号是否正确,返回正确的端口号 将字符串形式的IP地址转换成IPAddress对象 ...
- JAVA 相关资料
在技术方面无论我们怎么学习,总感觉需要提升自已不知道自己处于什么水平了.但如果有清晰的指示图供参考还是非常不错的,这样我们清楚的知道我们大概处于那个阶段和水平. Java程序员 高级特性 反射.泛型. ...
- jquery 中$('.ui-selecter',this)这样写 是什么意思 求解释 见到都是这种$("div")
如果用$("div")是拿选择所有的div$('.ui-selecter',this)选择的是现在选项中的child里面class是ui-selecter的意思跟jQuery(th ...
- 新安装 wampserver 出现 You don't have permission to access / on this server. 或者访问数据库出现You don't have permission to access /phpmyadmin/ on this server.(解决方法)转
本地搭建wamp,输入http://127.0.0.1访问正常,当输入http://localhost/,apache出现You don't have permission to access/on ...
- JS 同源策略
对于任何基于WEB的应用,最重要的就是安全性.JS中有各种安全检查以防止恶意脚本攻击你的机器,其中一些特定的安全手段在各种浏览器中都有采用.如:Mozilla有个完全独特的完全模型,涉及到了签署脚本和 ...
- SQL70001: This statement is not recognized in this context.
关于错误: SQL70001: This statement is not recognized in this context. 的产生原因以及解决办法. 在SQL Server Databas ...
- WPF 进度条
//Create a Delegate that matches the Signature of the ProgressBar's SetValue method private delegate ...
- 修改Tomcat命令窗口的名字
在运行多个tomcat窗口的时候,可以通过修改tomcat命令窗口的名字来区分不同的tomcat,修改如下: 找到tomcat下面的这个文件:tomcat_home\bin\catalina.bat, ...
- 通过javascript实现页面的横竖屏固定
javascript是不能固定页面是横屏还是竖屏的,但是我们可以通过另外一种思路来监听window.orientation状态,假设我们要固定页面为横屏显示,则当window.orientation返 ...