#include?<iostream>
using?namespace?std;
class?CPerson
{
public:
???????void?Print();
private:
???????CPerson();
private:
???????int?age;
???????char?*name;
};
CPerson::CPerson()
{
}
void?CPerson::Print()
{
???????cout<<"name="<<name<<",age="<<age<<endl;
}
?
void?main()
{
???????CPerson?ps(23,"張三");
???????ps.Print();
}說是有三大錯誤 ?但是怎么改都不行TAT ?上面是給出的代碼。。。
- 1 回答
- 1 關注
- 1429 瀏覽
添加回答
舉報
0/150
提交
取消