标题:【求助}怎么编译不通过
取消只看楼主
piaohai09
Rank: 1
等 级:新手上路
帖 子:18
专家分:0
注 册:2007-7-16
 问题点数:0 回复次数:1 
【求助}怎么编译不通过
# include <iostream>
int main()
{
using namespace std;
int* pt= new int;
*pt=1001;
cout<<"int";
cout<<"value="<<*pt<<":location="<<pt<<endl;
double* pd=new double ;
*pd=10000001.0;
cout<<"double";
cout<<"value="<<*pd<<":location="<<pd<<endl;
cout<<"size of pt="<<sizeof (pt);
cout<<"size of *pt="<<sizeof(*pt)<<endl;
cout<<"size of pd="<<sizeof pd;
cout<<"size of *pd="<<sizeof(*pd)<<endl;
return 0;
}


错误如下
Text2.cpp
D:\My Documents\Text2.cpp(4) : error C2018: unknown character '0xa3'
D:\My Documents\Text2.cpp(4) : error C2018: unknown character '0xbb'
D:\My Documents\Text2.cpp(5) : error C2144: syntax error : missing ';' before type 'int'
Text3.cpp
执行 cl.exe 时出错.
搜索更多相关主题的帖子: cout int endl sizeof 
2007-07-17 08:50
piaohai09
Rank: 1
等 级:新手上路
帖 子:18
专家分:0
注 册:2007-7-16
得分:0 
有没有哪个大哥解答一下的啊 !!

我是新手大家多多照顾,谢谢
2007-07-17 11:17



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-155920-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.497407 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved