问题描述:
.,float sco ):Person(nam,s,a),score(s){};后面为什么只有score(s)就行了?score也不是类型啊
class Student:public Person
{
public:
\x09Student(string,char,int,float);
\x09void display();
private:
float score;
};
Student::Student(string nam,char s,int a,float sco ):Person(nam,s,a),score(s){} //////为什么只有、/////score(s)就行了啊?score不是类名啊!
void Student::display()
{
\x09Person::display();
\x09cout
class Student:public Person
{
public:
\x09Student(string,char,int,float);
\x09void display();
private:
float score;
};
Student::Student(string nam,char s,int a,float sco ):Person(nam,s,a),score(s){} //////为什么只有、/////score(s)就行了啊?score不是类名啊!
void Student::display()
{
\x09Person::display();
\x09cout
问题解答:
我来补答展开全文阅读