【求助}怎么编译不通过
# 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 时出错.