最后聽(tīng)到的是------“同學(xué)們 請(qǐng)?jiān)僖?jiàn)!” 是的,他說(shuō)了“請(qǐng)“,禮貌得不像話
2017-10-12
一次可過(guò),代碼已經(jīng)壓縮,木有空行。嘿嘿
int main(void)
{
Student *stu = new Student();
stu->setName("慕課網(wǎng)");
cout<<stu->getName()<<endl;
delete stu;
stu = NULL;
return 0;
}
int main(void)
{
Student *stu = new Student();
stu->setName("慕課網(wǎng)");
cout<<stu->getName()<<endl;
delete stu;
stu = NULL;
return 0;
}
2017-09-24
class Student
{
public:
Student(){}
Student(string _name)
{
m_strName=_name;
}
Student(const Student& stu){ }
~Student(){}
void setName(string _name){m_strName = _name;}
string getName(){return m_strName;}
private:
string m_strName;
};
{
public:
Student(){}
Student(string _name)
{
m_strName=_name;
}
Student(const Student& stu){ }
~Student(){}
void setName(string _name){m_strName = _name;}
string getName(){return m_strName;}
private:
string m_strName;
};
2017-09-24
int main(void)
{
Student *stu = new Student();
stu->setName("m");
cout << stu->getName() << endl;
delete stu;
stu = NULL;
return 0;
{
Student *stu = new Student();
stu->setName("m");
cout << stu->getName() << endl;
delete stu;
stu = NULL;
return 0;
2017-09-18
class Student
{
public:
Student(){};
Student(string _name)
{
m_strName = _name;
};
Student(const Student& stu){};
~Student(){};
void setName(string _name)
{
m_strName = _name;
}
string getName()
{
return m_strName;
}
private:
string m_strName;
};
{
public:
Student(){};
Student(string _name)
{
m_strName = _name;
};
Student(const Student& stu){};
~Student(){};
void setName(string _name)
{
m_strName = _name;
}
string getName()
{
return m_strName;
}
private:
string m_strName;
};
2017-09-18
class Student
{
public:
void setName(string _name)
{
m_strName = _name;
}
string getName()
{
return m_strName;
}
private:
string m_strName;
};
int main()
{
Student *str = new Student;
str->setName("慕");
cout << str->getName() << endl;
delete str;
str = NULL;
return 0;
}
{
public:
void setName(string _name)
{
m_strName = _name;
}
string getName()
{
return m_strName;
}
private:
string m_strName;
};
int main()
{
Student *str = new Student;
str->setName("慕");
cout << str->getName() << endl;
delete str;
str = NULL;
return 0;
}