关于代码wxss 文件编译错误误的问题.求助

新手园地& & & 硬件问题Linux系统管理Linux网络问题Linux环境编程Linux桌面系统国产LinuxBSD& & & BSD文档中心AIX& & & 新手入门& & & AIX文档中心& & & 资源下载& & & Power高级应用& & & IBM存储AS400Solaris& & & Solaris文档中心HP-UX& & & HP文档中心SCO UNIX& & & SCO文档中心互操作专区IRIXTru64 UNIXMac OS X门户网站运维集群和高可用服务器应用监控和防护虚拟化技术架构设计行业应用和管理服务器及硬件技术& & & 服务器资源下载云计算& & & 云计算文档中心& & & 云计算业界& & & 云计算资源下载存储备份& & & 存储文档中心& & & 存储业界& & & 存储资源下载& & & Symantec技术交流区安全技术网络技术& & & 网络技术文档中心C/C++& & & GUI编程& & & Functional编程内核源码& & & 内核问题移动开发& & & 移动开发技术资料ShellPerlJava& & & Java文档中心PHP& & & php文档中心Python& & & Python文档中心RubyCPU与编译器嵌入式开发驱动开发Web开发VoIP开发技术MySQL& & & MySQL文档中心SybaseOraclePostgreSQLDB2Informix数据仓库与数据挖掘NoSQL技术IT业界新闻与评论IT职业生涯& & & 猎头招聘IT图书与评论& & & CU技术图书大系& & & Linux书友会二手交易下载共享Linux文档专区IT培训与认证& & & 培训交流& & & 认证培训清茶斋投资理财运动地带快乐数码摄影& & & 摄影器材& & & 摄影比赛专区IT爱车族旅游天下站务交流版主会议室博客SNS站务交流区CU活动专区& & & Power活动专区& & & 拍卖交流区频道交流区
稍有积蓄, 积分 413, 距离下一级还需 87 积分
论坛徽章:0
各位大哥大姐,小弟编写的代码在编译的时候遇到了一个编译的错误如下:
tempmemb.cpp: In member function `U beta&T&::blab(U, T) [with U = int, T = double]':
tempmemb.cpp:33:& &instantiated from here
tempmemb.cpp:25: warning: converting to `int' from `double'
小弟的代码是这样的:
&* tempmemb.cpp
&*&&Created on:
&*& && &Author: efegliu
#include &iostream&
using std::cout;
using std::endl;
template &typename T&
class beta{
&&&&template &typename V&
&&&&class hold{
&&&&private:
&&&&&&&&V val;
&&&&public:
&&&&&&&&hold(V v=0):val(v){}
&&&&&&&&void show()const{ cout && val && endl;}
&&&&&&&&V Value()const{return val;}
&&&&hold&T& q;
&&&&hold&int& n;
&&&&beta(T t, int i) : q(t), n(i) {}
&&&&template&typename U&
&&&&U blab(U u, T t){ return (n.Value() + q.Value()) * u / t;}
&&&&void Show() const {q.show(); n.show();}
int main(){
&&&&beta&double& guy(3.5, 3);
&&&&guy.Show();
&&&&cout && guy.blab(10, 2.3) && endl;
&&&&cout && &Done\n&;
&&&&system(&quotAUSE&);
&&&&return 0;
请问一下各位大哥大姐, 这到底是怎么回事?为什么会出现tempmemb.cpp:33:& &instantiated from here的错误呢?
小弟不胜感激~~~
家境小康, 积分 1430, 距离下一级还需 570 积分
论坛徽章:0
原帖由 sohu2000000 于
12:43 发表
各位大哥大姐,小弟编写的代码在编译的时候遇到了一个编译的错误如下:
tempmemb.cpp: In member function `U beta::blab(U, T) [with U = int, T = double]':
tempmemb.cpp:33:& &instantiated from here
这不是个错误。这是说在这个地方实例化模板导致下面的错误:tempmemb.cpp:25: warning: converting to `int' from `double'
丰衣足食, 积分 554, 距离下一级还需 446 积分
论坛徽章:0
回复 #1 sohu2000000 的帖子
会不会是因为实例化beta&double&这个类时,因为U不确定,所以只能默认将U当作int(从编译器输出“In member function `U beta&T&::blab(U, T) [with U = int, T = double]'”来看,它也认为U是int);
但是当调用guy.blab(10, 2.3)时,函数体计算的结果为double,返回时将转换为int,因为U是int。
家境小康, 积分 1430, 距离下一级还需 570 积分
论坛徽章:0
原帖由 huangwei0413 于
13:07 发表
会不会是因为实例化beta这个类时,因为U不确定,所以只能默认将U当作int(从编译器输出“In member function `U beta::blab(U, T) [with U = int, T = double]'”来看,它也认为U是int);
但是当调用guy.blab ...
U本来就应该是int, 因为 10 是int。
问题在于 q.Value() 返回的是double,所以 “(n.Value() + q.Value()) * u /”是个double。而函数的返回值是int (U)。
丰衣足食, 积分 554, 距离下一级还需 446 积分
论坛徽章:0
原帖由 lgfang 于
13:10 发表
U本来就应该是int, 因为 10 是int。
问题在于 q.Value() 返回的是double,所以 “(n.Value() + q.Value()) * u /”是个double。而函数的返回值是int (U)。
我明白你的意思,关键是我不知道当类被实例化的时候,它的成员函数是不是一定全部实例化,还是等到被调用的时候再实例化
丰衣足食, 积分 554, 距离下一级还需 446 积分
论坛徽章:0
回复 #5 huangwei0413 的帖子
楼主可以试一下,把cout && guy.blab(10, 2.3) &&改为
cout && guy.blab(10.) &&
如果要抱错,就说明类被实例的时候,它的成员函数就要被实例。
小富即安, 积分 4960, 距离下一级还需 40 积分
论坛徽章:0
没看到error,只看到warning
稍有积蓄, 积分 413, 距离下一级还需 87 积分
论坛徽章:0
原帖由 huangwei0413 于
13:16 发表
楼主可以试一下,把cout&&
非常感谢,如果改成double就可以正确的链接了
但是我有个问题还是要提:
U blab(U u, T t){ return (n.Value() + q.Value()) * u / t;}
不是模版函数么? 我看到说明里面写的是函数的返回值会根据&U u&参数而自动设定的,而且在《C++ PRIMER》中也写道了这点:
if( U 为 int ,如 10 ){
& &&&返回值转换成为INT
}else if ( U 为 double, 如 10.0 ){
& &&&返回值转换成为DOUBLE;
但是为什么我在windows和linux编译以后都是不可以通过呢?
不胜感谢大家的帮助 :wink:
白手起家, 积分 105, 距离下一级还需 95 积分
论坛徽章:0
&我看到说明里面写的是函数的返回值会根据&U u&参数而自动设定的&
不可能吧。。。
哪里看到的?返回值的类型是无法推断的 。
白手起家, 积分 144, 距离下一级还需 56 积分
论坛徽章:0
tempmemb.cpp:25: warning: converting to `int' from `double'
应该是定义 数据错误后使用快捷导航没有帐号?
查看: 11886|回复: 11
【求助】关于编译错误的问题
在线时间2 小时
TA的帖子TA的资源
一粒金砂(初级), 积分 0, 距离下一级还需 5 积分
一粒金砂(初级), 积分 0, 距离下一级还需 5 积分
我在使用msp430编译软件时发生的问题:
本来使用的4k限制版,因为超过了4k就找了个无限制的,结果在4k限制版编译通过的程序,在无限制版中发生了错误。出现了n个错误!找了几个错误,大家看看是为什么?
Error[Pe077]: this declaration has no storage class or type specifier
Error[Pe065]: expected a &;&
Error[Pe079]: expected a type specifier
Warning[Pe077]: this declaration has no storage class or type specifier
Error[Pe147]: declaration is incompati××e with &unsigned char __data frq_data_send& (declared at line 165)
在线时间0 小时
TA的帖子TA的资源
一粒金砂(初级), 积分 0, 距离下一级还需 5 积分
一粒金砂(初级), 积分 0, 距离下一级还需 5 积分
用的是什么版本?是否还有信息?
在线时间0 小时
TA的帖子TA的资源
一粒金砂(初级), 积分 2, 距离下一级还需 3 积分
一粒金砂(初级), 积分 2, 距离下一级还需 3 积分
不同的版本,就有不同的写法,就像环境不一样,中断函数的名字也不一样,我遇到过这样的情况(两个不同版本下定时器初始化时寄存器的名称不同)建议从程序入手修改~~~~~~~
在线时间1 小时
TA的帖子TA的资源
一粒金砂(初级), 积分 0, 距离下一级还需 5 积分
一粒金砂(初级), 积分 0, 距离下一级还需 5 积分
用的是msp430 V2.10A
所有信息如下:
icc430.exe -I J:\Program Files\IAR Systems\Embedded Workbench 3.2\430\INC\ -I J:\Program Files\IAR Systems\
Embedded Workbench 3.2\430\INC\CLIB\ -o J:\Program Files\IAR Systems\Embedded Workbench 3.2\common\bin\
Debug\Obj\ -s2 --no_cse --no_unroll --no_inline --no_code_motion --debug -e J:\dbd\050223.c
IAR MSP430 C/EC++ Compiler V2.10A/W32
IAR Systems. All rights reserved.
Error[Pe077]: this declaration has no storage class or type specifier
Error[Pe065]: expected a &;&
Warning[Pe012]: parsing restarts here after previous syntax error
Error[Pe079]: expected a type specifier
Warning[Pe077]: this declaration has no storage class or type specifier
Error[Pe147]: declaration is incompati××e with &void delay(unsigned int)& (declared at line 153)
Error[Pe169]: expected a declaration
Warning[Pe012]: parsing restarts here after previous syntax error
Error[Pe169]: expected a declaration
Warning[Pe012]: parsing restarts here after previous syntax error
Error[Pe169]: expected a declaration
Error[Pe169]: expected a declaration
Error[Pe169]: expected a declaration
Error[Pe169]: expected a declaration
Error[Pe169]: expected a declaration
Error[Pe169]: expected a declaration
Error[Pe169]: expected a declaration
Error[Pe169]: expected a declaration
Warning[Pe012]: parsing restarts here after previous syntax error
Error[Pe169]: expected a declaration
Warning[Pe012]: parsing restarts here after previous syntax error
Error[Pe079]: expected a type specifier
Warning[Pe077]: this declaration has no storage class or type specifier
Error[Pe147]: declaration is incompati××e with &void lcd_wr_data(int)& (declared at line 162)
Error[Pe079]: expected a type specifier
Warning[Pe077]: this declaration has no storage class or type specifier
Error[Pe169]: expected a declaration
Warning[Pe012]: parsing restarts here after previous syntax error
Error[Pe077]: this declaration has no storage class or type specifier
Error[Pe147]: declaration is incompati××e with &unsigned char __data frq_con_data3& (declared at line 178)
Error[Pe028]: expression must h××e a constant value
Error[Pe169]: expected a declaration
Warning[Pe012]: parsing restarts here after previous syntax error
Error[Pe169]: expected a declaration
Warning[Pe012]: parsing restarts here after previous syntax error
Error[Pe169]: expected a declaration
Warning[Pe012]: parsing restarts here after previous syntax error
Error[Pe169]: expected a declaration
Warning[Pe012]: parsing restarts here after previous syntax error
Error[Pe169]: expected a declaration
Warning[Pe012]: parsing restarts here after previous syntax error
Error[Pe077]: this declaration has no storage class or type specifier
Error[Pe147]: declaration is incompati××e with &unsigned char __data frq_data_send& (declared at line 186)
Error[Pe169]: expected a declaration
Warning[Pe012]: parsing restarts here after previous syntax error
Warning[Pe077]: this declaration has no storage class or type specifier
Error[Pe147]: declaration is incompati××e with &void __no_operation(void)& (declared at line 28 of &J:\Program Files\IAR
Systems\Embedded Workbench 3.2\430\INC\intrinsics.h&)
Error[Pe018]: expected a &)&
Error[Pe077]: this declaration has no storage class or type specifier
Error[Pe147]: declaration is incompati××e with &unsigned char volatile __data P1OUT& (declared at line 243 of &J:\
Program Files\IAR Systems\Embedded Workbench 3.2\430\INC\msp430x14x.h&)
Error[Be012]: location address not allowed (object must h××e static storage duration and be const or __no_init)
Warning[Pe077]: this declaration has no storage class or type specifier
Warning[Pe077]: this declaration has no storage class or type specifier
Error[Pe079]: expected a type specifier
Warning[Pe077]: this declaration has no storage class or type specifier
Error[Pe077]: this declaration has no storage class or type specifier
Error[Pe147]: declaration is incompati××e with &unsigned char __data led_i& (declared at line 182)
Error[Pe065]: expected a &;&
Error[Pe169]: expected a declaration
Warning[Pe012]: parsing restarts here after previous syntax error
Error[Pe169]: expected a declaration
Error[Pe077]: this declaration has no storage class or type specifier
Error[Pe147]: declaration is incompati××e with &unsigned char volatile __data TXBUF1& (declared at line 439 of &J:\
Program Files\IAR Systems\Embedded Workbench 3.2\430\INC\msp430x14x.h&)
Error[Be012]: location address not allowed (object must h××e static storage duration and be const or __no_init)
Error[Pe028]: expression must h××e a constant value
Error[Pe169]: expected a declaration
Error[Pe077]: this declaration has no storage class or type specifier
Error[Pe147]: declaration is incompati××e with &&error-type& TXBUF1& (declared at line 1184)
Warning[Pa034]: initialized varia××e can not h××e __no_init attribute, discarded
Error[Be012]: location address not allowed (object must h××e static storage duration and be const or __no_init)
Error[Pe169]: expected a declaration
Error[Pe077]: this declaration has no storage class or type specifier
Error[Pe147]: declaration is incompati××e with &&error-type& TXBUF1& (declared at line 439 of &J:\Program Files\IAR
Systems\Embedded Workbench 3.2\430\INC\msp430x14x.h&)
Error[Be012]: location address not allowed (object must h××e static storage duration and be const or __no_init)
Error[Pe148]: varia××e &TXBUF1& has already been initialized
Error[Pe169]: expected a declaration
Error[Pe077]: this declaration has no storage class or type specifier
Error[Pe147]: declaration is incompati××e with &&error-type& TXBUF1& (declared at line 439 of &J:\Program Files\IAR
Systems\Embedded Workbench 3.2\430\INC\msp430x14x.h&)
Error[Be012]: location address not allowed (object must h××e static storage duration and be const or __no_init)
Error[Pe148]: varia××e &TXBUF1& has already been initialized
Error[Pe028]: expression must h××e a constant value
Error[Pe169]: expected a declaration
Error[Pe169]: expected a declaration
Warning[Pe012]: parsing restarts here after previous syntax error
Error[Pe169]: expected a declaration
Warning[Pe077]: this declaration has no storage class or type specifier
Error[Pe147]: declaration is incompati××e with &void __ena××e_interrupt(void)& (declared at line 29 of &J:\Program Files\
IAR Systems\Embedded Workbench 3.2\430\INC\intrinsics.h&)
Error[Pe018]: expected a &)&
Error[Pe077]: this declaration has no storage class or type specifier
Error[Pe018]: expected a &)&
Error[Pe077]: this declaration has no storage class or type specifier
Error[Pe147]: declaration is incompati××e with &unsigned char volatile __data P4OUT& (declared at line 286 of &J:\
Program Files\IAR Systems\Embedded Workbench 3.2\430\INC\msp430x14x.h&)
Error[Be012]: location address not allowed (object must h××e static storage duration and be const or __no_init)
Error[Pe018]: expected a &)&
Error[Pe077]: this declaration has no storage class or type specifier
Error[Pe018]: expected a &)&
Error[Pe077]: this declaration has no storage class or type specifier
Error[Pe018]: expected a &)&
Error[Pe077]: this declaration has no storage class or type specifier
Error[Pe018]: expected a &)&
Error[Pe077]: this declaration has no storage class or type specifier
Error[Pe018]: expected a &)&
Error[Pe077]: this declaration has no storage class or type specifier
Error[Pe018]: expected a &)&
Error[Pe077]: this declaration has no storage class or type specifier
Error[Pe147]: declaration is incompati××e with &unsigned char volatile __data P5OUT& (declared at line 299 of &J:\
Program Files\IAR Systems\Embedded Workbench 3.2\430\INC\msp430x14x.h&)
Error[Be012]: location address not allowed (object must h××e static storage duration and be const or __no_init)
Error[Pe018]: expected a &)&
Error[Pe077]: this declaration has no storage class or type specifier
Error[Pe077]: this declaration has no storage class or type specifier
Error[Pe147]: declaration is incompati××e with &&error-type& TXBUF1& (declared at line 439 of &J:\Program Files\IAR
Systems\Embedded Workbench 3.2\430\INC\msp430x14x.h&)
Error[Be012]: location address not allowed (object must h××e static storage duration and be const or __no_init)
Error[Pe148]: varia××e &TXBUF1& has already been initialized
Error[Pe169]: expected a declaration
Error[Pe077]: this declaration has no storage class or type specifier
Error[Pe147]: declaration is incompati××e with &&error-type& TXBUF1& (declared at line 439 of &J:\Program Files\IAR
Systems\Embedded Workbench 3.2\430\INC\msp430x14x.h&)
Error[Be012]: location address not allowed (object must h××e static storage duration and be const or __no_init)
Error[Pe148]: varia××e &TXBUF1& has already been initialized
Error[Pe169]: expected a declaration
Error[Pe169]: expected a declaration
Warning[Pe012]: parsing restarts here after previous syntax error
Error[Pe079]: expected a type specifier
Warning[Pe077]: this declaration has no storage class or type specifier
Error[Pe079]: expected a type specifier
Warning[Pe077]: this declaration has no storage class or type specifier
Error[Pe079]: expected a type specifier
Warning[Pe077]: this declaration has no storage class or type specifier
Error[Pe169]: expected a declaration
Warning[Pe012]: parsing restarts here after previous syntax error
在线时间2 小时
TA的帖子TA的资源
一粒金砂(初级), 积分 0, 距离下一级还需 5 积分
一粒金砂(初级), 积分 0, 距离下一级还需 5 积分
这可能是您程序是以前在老版本下编写的,现在用的是新的高版本吧!
在线时间2 小时
TA的帖子TA的资源
一粒金砂(初级), 积分 0, 距离下一级还需 5 积分
一粒金砂(初级), 积分 0, 距离下一级还需 5 积分
还是无法断定是什么错误?我也是这个版本,如果可以,可将程序发到信箱,编译看是什么错误。
在线时间1 小时
TA的帖子TA的资源
一粒金砂(初级), 积分 0, 距离下一级还需 5 积分
一粒金砂(初级), 积分 0, 距离下一级还需 5 积分
一般说来,这些错误是C程序本身的错误或编译环境的问题,与4k不4k无关,具体的你可用鼠标点一下错误代码,看跳到具体出错之处,再仔细检查。另我看了一下出错提示很多是针对头文件“msp430x14x.h”,你可以做相应检查。
在线时间1 小时
TA的帖子TA的资源
一粒金砂(初级), 积分 0, 距离下一级还需 5 积分
一粒金砂(初级), 积分 0, 距离下一级还需 5 积分
程序已发过去了,请帮忙,谢谢!
在线时间3 小时
TA的帖子TA的资源
一粒金砂(初级), 积分 0, 距离下一级还需 5 积分
一粒金砂(初级), 积分 0, 距离下一级还需 5 积分
是新就版本的问题,我也遇到过!记得把中断函数格式改一下
还有一个问题就是说好像在结束行上没有一个新行的警告,我现在还没找出原因!大家谁知道啊?
在线时间0 小时
TA的帖子TA的资源
一粒金砂(初级), 积分 0, 距离下一级还需 5 积分
一粒金砂(初级), 积分 0, 距离下一级还需 5 积分
[还有一个问题就是说好像在结束行上没有一个新行的警告,我现在还没找出原因!大家谁知道啊?]
-----------这种情况是一个警告,没有影响。可在源程序最后一行完毕时,加以回车换行即可。
在线时间0 小时
TA的帖子TA的资源
一粒金砂(初级), 积分 0, 距离下一级还需 5 积分
一粒金砂(初级), 积分 0, 距离下一级还需 5 积分
将3个中断修改即可,
//interrupt[UART1RX_VECTOR] void usart1_rx (void)
#pragma vector=UART1RX_VECTOR
__interrupt
UART1RX(void)
在线时间0 小时
TA的帖子TA的资源
一粒金砂(初级), 积分 0, 距离下一级还需 5 积分
一粒金砂(初级), 积分 0, 距离下一级还需 5 积分
THANK YOU!
问题已经解决
EEWORLD 官方微信
Powered byAccess denied | www.supmen.com used Cloudflare to restrict access
Please enable cookies.
What happened?
The owner of this website (www.supmen.com) has banned your access based on your browser's signature (3db46d24-ua98).求助,网站服务器编译错误:未能找到元数据文件System.Configuration.dll
求助,网站服务器编译错误:未能找到元数据文件System.Configuration.dll
各位大虾,小弟网站服务器昨日崩溃了,今天修复好了,可以正常启动之后却发现网站打不开了,服务器是美国的,2003的中文系统,错误提示如下编译错误说明: 在编译向该请求提供服务所需资源的过程中出现错误。请检查下列特定错误详细信息并适当地修改源代码。编译器错误消息: CS0006: 未能找到元数据文件“C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll”源错误:[没有相关的源行]源文件:
行: 0显示详细的编译器输出:版本信息: Microsoft .NET Framework 版本:2.0.; ASP.NET 版本:2.0.& 在网上找了很多方法试了都解决不了,试过重装3.5的框架、修改C:\WINDOWS\temp权限、重启服务器,下载整个网站再重新生成再上传等都不行,真的没有办法了,快要崩溃了,求助...感激不尽
昵称: liuguojiank &时间:
昵称: fengyarongaa &时间:
昵称: porschev &时间:
顶下,我也出过这个问题,就直接复制过来文件就OK了
昵称: LONG &时间:
不是每个问题都能找到确切的原因的
昵称: xuexiaodong2009 &时间:
请问一下三楼的是把文件复制到哪里的??我试了二楼方法,还是不行
昵称: liuguojiank &时间:
昵称: liuchaolin &时间:
昵称: wxr0323 &时间:后使用快捷导航没有帐号?
 论坛入口:
  |   |    |   | 
查看: 7403|回复: 12
编译传3代码过程中出现问题! 求助各位
我的环境是,vs.net&&direct9 sdk
错误语句: INT nTemp =(INT) (125.0f * sin((m_nRoll/10)));
错误提示:
&&SelectChr.cpp
c:\documents and settings\shilong\桌面\mir2excode\mir2ex\charselectprocess\selectchr\selectchr.cpp(280) : error C2668: “sin” : 对重载函数的调用不明确
& && &&&c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\math.h(622): 可能是“long double sin(long double)”
& && &&&c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\math.h(574): 或& && & “float sin(float)”
& && &&&c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\math.h(196): 或& && & “double sin(double)”
& && &&&试图匹配参数列表“(int)”时
Re:编译传3代码过程中出现问题! 求助各位
哪有下啊?烦请告之。
Re:编译传3代码过程中出现问题! 求助各位
& &&&传3的开发环境是VC,VC和VC.NET在封装变量类型的时候是有些不同的。
& && &这个应该是因为你用的编译环境是VC.net,建议你用VC试试,应该不会出现这个问题了。
Re:编译传3代码过程中出现问题! 求助各位
是啊,楼主能否贴一下传3的源代码下载地址啊!??小弟先谢谢了!!!
Re:编译传3代码过程中出现问题! 求助各位
你们能说说哪里不同吗
源码我发给你们,加我QQ1250803,交个朋友,互相交流
Re:编译传3代码过程中出现问题! 求助各位
& && & 你的编译错误是出在sin函数的重载调用上。在那个地方应该调用sinf(float),也就是重载的sin函数,重载方式是里面的参数类型。sinf是用了float参数。你自己仔细看看,那个地方,如果不是sinf((m_nRoll/10))就是错的。
& && & 如果你的也是sinf((m_nRoll/10)),那么试着用下面语句替换:sinf(float(m_nRoll/10)),其目的就是强制转换m_nRoll/10的数据类型,从而强制使用sinf(float)方式的sin函数重载。
Re:编译传3代码过程中出现问题! 求助各位
楼上的真是高手,这个问题我已经解决了,非常感谢你无私的帮助,希望联系一下,成为朋友。
Re:编译传3代码过程中出现问题! 求助各位
不好意思又出问题了
错误语句:
& && && && & g_xMainWnd.PutsHan(g_xMainWnd.GetBackBuffer(),
& & & & & & & & & & & & & & & & & & & & & & & & & & & && & m_rcWnd.left+m_rcChatPopFrame.left, m_rcWnd.top+m_rcChatPopFrame.top+nLine*14,
& & & & & & & & & & & & & & & & & & & & & & & & & & & && & pstChatString-&dwFontBackColor, pstChatString-&dwFontColor, pstChatString-&strChat.begin());
错误提示:
ChatPopWnd.cpp
c:\documents and settings\shilong\桌面\mir2excode\mir2ex\gameprocess\chatpopwnd.cpp(130) : error C2664: “void CWHDXGraphicWindow:utsHan(LPDIRECTDRAWSURFACE7,INT,INT,COLORREF,COLORREF,CHAR *,HFONT)” : 不能将参数 6 从“std::basic_string&_Elem,_Traits,_Ax&::iterator”转换为“CHAR *”
& && &&&with
& && && && &_Elem=char,
& && && && &_Traits=std::char_traits&char&,
& && && && &_Ax=std::allocator&char&
& && &&&没有可用于执行该转换的用户定义的转换运算符,或者无法调用该运算符
Re:编译传3代码过程中出现问题! 求助各位
大家帮忙看看吧,小弟知识有限呀
Re:编译传3代码过程中出现问题! 求助各位
& & 还是参数数据类型转换上的错误!
& & 最后一个参数调用 pstChatString-&strChat.begin()函数,返回值应该是string;而PutsHan函数的最后一个参数应该是一个char *。在VC6下是可以调试通过的。
& & 如果在.NET下无法调试通过,修改方法就比较繁琐。
& & 找到chatpopwnd.h文件。在他的成员变量声明中将strChat的类型设从string改为char *;
& & 然后在你出错的程序初始化函数中加入以下语句:
& & strChat=new char[1024];
& & 最后在程序析构函数中加入一下语句:
& & if (strChat)
& && & delete strC
& & 然后你再试试调试。}

我要回帖

更多关于 pr错误编译影片 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信