aboutsummaryrefslogtreecommitdiff
path: root/week10/Exercise07/String.h
blob: c622f5bb1c0afb5f657c0af94fbc54f12cbc5d3c (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
#pragma once

class String {
protected:
	char* str;
	unsigned length;

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

public:
	String(const char* str);

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

	char& At(unsigned index);
	const char* GetPtr();
};