aboutsummaryrefslogtreecommitdiff
path: root/week10/Exercise10/String.h
blob: 4ae55c0099f3b489601688712e8677316b15a852 (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();
	~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);
};