.,float sco ):Person(nam,s,a),score(s){};后面为什么只有score(s)就行了?
来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/11/07 23:43:07
.,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
这是构造函数初始化参数的一种形式,比在构造函数体内部赋值要好.
再问: score也不是类,也没有score这个声明啊?
再问: score也不是类,也没有score这个声明啊?
.,float sco ):Person(nam,s,a),score(s){};后面为什么只有score(s)就行了?
get high score中score为什么不加s
To determine a student’s overall test score for the
score 可以什么时候+s 什么时候不+ s 比如 add up your score and see how muc
what's the score?it's one all
请问 scanf("%s%d",s[i].name,&s[i].score); 语句中为什么s[i].name 前可以不
scanf("%d%s%d",&s[i].num,&s[i].name,&s[i].score);和scanf("%d%
such a poor score in the entrance exam,it’s ________ impossi
英语翻译We played a game last night.The score was tired six-to-s
英翻汉 It's not obvious howthe capacity to get a high score in
score作名词(意思是分数)时能加S吗,
“score