#include
#include
using namespace std;
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[20];
str->setName("慕课网");
cout<<str<<endl;
delete str;
str=NULL;
return 0;
}
c++代码编译没错程序停止工作怎么办
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-