写的程序如下:Person::Person() { std::string *name=new std::string [255]; } Person::~Person() { delete [] name; } 错误如下图:
Person::Person() { std::string *name=new std::string [255]; } Person::~Person() { delete [] name; }
nameDeclared in the constructor
name
name
Declared in the constructor