老師厲害,不錯,講的真心好,上課上了好幾周沒聽懂,今天一晚上就感覺學到了一個學期東西。我一直很努力,可是才發現,努力并不是最重要的,關鍵在于效率和方法啊,慕課網真的很好,很感激。希望越做越大,越做越卓越!
2018-04-29
這下邊哪里錯了么
void Student::setName(string _name)
{
m_strName = _name;
}
string Student:: getName()
{
return m_strName;
}
int main(void)
{
Student *stu=new Student;
stu->setName("mukewang");
cout << stu->setName() << endl;
delete stu;
stu =NULL;
return 0;
}
void Student::setName(string _name)
{
m_strName = _name;
}
string Student:: getName()
{
return m_strName;
}
int main(void)
{
Student *stu=new Student;
stu->setName("mukewang");
cout << stu->setName() << endl;
delete stu;
stu =NULL;
return 0;
}