diff options
Diffstat (limited to 'week12/Exercise4/Person.h')
| -rw-r--r-- | week12/Exercise4/Person.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/week12/Exercise4/Person.h b/week12/Exercise4/Person.h new file mode 100644 index 0000000..030ff8b --- /dev/null +++ b/week12/Exercise4/Person.h @@ -0,0 +1,20 @@ +#pragma once + +class Person { + char* name; + unsigned age; + + void free(); + void copyFrom(const Person& other); + +public: + Person(); + virtual ~Person(); + Person(const Person& other); + Person& operator=(const Person& other); + Person(Person&& other); + Person& operator=(Person&& other); + + friend bool operator==(const Person& left, const Person& right); + friend bool operator!=(const Person& left, const Person& right); +}; |
