diff options
| author | Syndamia <kamen@syndamia.com> | 2024-05-10 12:27:14 +0300 |
|---|---|---|
| committer | Syndamia <kamen@syndamia.com> | 2024-05-10 12:27:14 +0300 |
| commit | eb6305c8b0a71a613a34edbcabdaf1fde259451d (patch) | |
| tree | 2ba4402c82569810ab4287175670193597cc52d4 /week12/Exercise4/Person.h | |
| parent | 8dd9b39fa54a91030cdd5fe71973f78f7e8089e0 (diff) | |
| download | oop-2023-solutions-eb6305c8b0a71a613a34edbcabdaf1fde259451d.tar oop-2023-solutions-eb6305c8b0a71a613a34edbcabdaf1fde259451d.tar.gz oop-2023-solutions-eb6305c8b0a71a613a34edbcabdaf1fde259451d.zip | |
[w12] Finished ex 4
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); +}; |
