aboutsummaryrefslogtreecommitdiff
path: root/week10/Exercise07/String.h
blob: 3ea986a70506abf735a03a5b5f6ac4ce5739ce74 (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();
	~String();
	String(const String& other);
	String& operator=(const String& other);
	String(String&& other);
	String& operator=(String&& other);

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