Website Summary Files Commits Branches @commit @diff @stats
path: root / Sem. 07 / Person / Person.h
blob: 43f02283480014e82266a5da59ed3bcdf240cbc7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#pragma once
#include <iostream>
class Person
{
	char* name = nullptr;
	int age = 0;

	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;

};