作业帮 > 综合 > 作业

#includeusing namespace std;class Advisor{int noofmeeting;};

来源:学生作业帮 编辑:搜狗做题网作业帮 分类:综合作业 时间:2024/06/06 00:37:04
#include
using namespace std;
class Advisor
{
int noofmeeting;
};
class Student
{
string name;
int semesterhours;
double average;
public:
Student(string pn="no name"):name(pn),semesterhours(0),average(0){}
void addcourse(int hours,double grade)
{
double totalgrade=average*semesterhours+grade;
semesterhours+=hours;
average=semesterhours totalgrade/semesterhours :0;
}
void display()
{
cout
#includeusing namespace std;class Advisor{int noofmeeting;};

#include
using namespace std;
改为
#include
#include
using namespace std;
即可.
或者
cout