CodePudding user response:
The constructor to char * take offCodePudding user response:
Remember the free memory in the destructor,CodePudding user response:
Char * name=new... Amounts to a defined a name variable, and the member attribute name name as
Strcpy (name, strle + 1, name) at this time of the account name without is you just define the local variables of the
Warning is prompt you the name and the class itself attribute name may be you are confused by the
If on the first floor, the char * name=new char [... change name=new char [... good
When you really have a need to define a name and class attribute of the same name when the name variable
The name is your new variables defined, or pass the variables involved in
This - & gt; The name is the property