Website Summary Files Commits Branches @commit @diff @stats
path: root / Sem. 07 / Person / Person.h
diff options
context:
space:
mode:
1 files changed, 27 insertions, 1 deletions
-rw-r--r--Sem. 07/Person/Person.h28
diff --git a/Sem. 07/Person/Person.h b/Sem. 07/Person/Person.h
index 4bcfe98..960d96a 100644
--- a/Sem. 07/Person/Person.h
+++ b/Sem. 07/Person/Person.h
@@ -1 +1,27 @@
-d
+#pragma once
+#include <iostream>
+class Person
+{
+ char* name = nullptr;
+ int age;
+
+ void copyFrom(const Person& other);
+ void free();
+
+public:
+ Person() = default;
+ Person(const char* name, int age);
+
+ Person(const Person& other);
+ Person& operator=(const Person& other);
+
+ const char* getName() const;
+ int getAge() const;
+
+ void setName(const char* name);
+ void setAge(int age);
+
+ ~Person();
+ void print() const;
+
+};