Advertisement
Guest User

Untitled

a guest
Oct 17th, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. class Person {
  2. int age;
  3. char* name;
  4. public:
  5. Person(int age, char* name) : age(age) {
  6. this->name = new char[strlen(name)+1];
  7. strcpy(this->name, name);
  8. }
  9. // …
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement