aboutsummaryrefslogtreecommitdiff
path: root/week11/Exercise04/String.h
diff options
context:
space:
mode:
Diffstat (limited to 'week11/Exercise04/String.h')
-rw-r--r--week11/Exercise04/String.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/week11/Exercise04/String.h b/week11/Exercise04/String.h
new file mode 100644
index 0000000..13481a0
--- /dev/null
+++ b/week11/Exercise04/String.h
@@ -0,0 +1,18 @@
+#pragma once
+
+class String {
+ 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);
+
+ virtual unsigned Length();
+};