#include "student.h"
#include <string>
#include <iostream>
using namespace std;
student::student(int n,char s,datetime date,int i,string c,int g): person(n,s,date,i), course(c), performance(g)
{
}
void student::GetScore()
{
cout<<person.show<<endl;
}
void student::GetCourseName()
{
cout<<course<<performance<<endl;
}
student::~student(void)
{
}
这一句报错了:cout<<course<<performance<<endl;
怎么改?
第1个回答 2012-04-30
this.course course是个成员,要指定对象才行追问
这里this指针是可以省略的。。