首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

一个C++程序出有关问题了。可塑看不懂= =

2012-09-03 
一个C++程序出问题了。。可塑看不懂 #include iostream#include stringusing namespace stdclass stu

一个C++程序出问题了。。可塑看不懂= =
#include <iostream>
#include <string>
using namespace std;
class student{
public:
student(string id,string name,double score)
{
this->id=id;
this->name=name;
this->score=score;
}
double getscore(){return score;}
void print()
{
cout<<"id is"<<id<<endl;
cout<<"name is"<<name<<endl;
cout<<"score is"<<score<<endl;
}
private:
string id;
string name;
double score;
};
int main(){
student s1("001","小张",85);
student *p;
p=&s1;
if(p->getscore()>=80&&p->getscore()<=90)
{
p->print();
};
return 0;
}

报错的内容看不懂

[解决办法]
student s1("001","小张",85)这条语句有中文标点符号,改过来就好了。
[解决办法]
把错误贴上来,装了Windows8,还没装编译器。
编译不了。

热点排行
Bad Request.