Advertisement
Guest User

Untitled

a guest
Oct 17th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. class Person {
  2. int age;
  3. char* name;
  4. public:
  5. Person(): age(0), name(nullptr){}
  6.  
  7. Person(const Person& other) : age(other.age), name(other.name) {}
  8. Person& operator=(const Person& other) {
  9. this->age = other.age;
  10. this->name = other.name;
  11. return *this;
  12. }
  13. ~Person(){}
  14. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement