Student()
{}
Student(string _name)
{
m_strName = _name;
}
Student(const Student& stu)
{
m_strName = stu.m_strName;
}
~Student()
{}
這樣就行, 其他的用默認的就行了
{}
Student(string _name)
{
m_strName = _name;
}
Student(const Student& stu)
{
m_strName = stu.m_strName;
}
~Student()
{}
這樣就行, 其他的用默認的就行了
cout << str->getName();
不能寫成
cout << str->getName() << endl;
不能寫成
cout << str->getName() << endl;