aboutsummaryrefslogtreecommitdiff
path: root/week10/Exercise10/String.h
blob: d63bf9668a93d529c34b480edebbd2f7a5d4510b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#pragma once

class String {
protected:
	char* str;

	void free();
	void copyFrom(const String& other);

public:
	String();
	virtual ~String();
	String(const String& other);
	String& operator=(const String& other);
	String(String&& other);
	String& operator=(String&& other);

	friend bool operator==(const String& left, const String& right);
	friend bool operator!=(const String& left, const String& right);
	friend String operator+(const String& left, const String& right);
};