在codeblocks中结果正确但是提交上去就是不对哪儿错了?
#include <iostream>
#include<string>
using namespace std;
class Student
{
public:
Student(){
m_strName=" ";}
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;
};
int main()
{
Student *stu=new Student();
stu->setName("慕课网");
cout<<stu->getName()<<endl;
return 0;
}