From 9c11fababb9b6b194e646fbeb62d141aacf74c43 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sat, 25 May 2024 16:08:17 +0300 Subject: [w13] Added solutions --- week13/Exercise1/String.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 week13/Exercise1/String.h (limited to 'week13/Exercise1/String.h') diff --git a/week13/Exercise1/String.h b/week13/Exercise1/String.h new file mode 100644 index 0000000..b2f0ee9 --- /dev/null +++ b/week13/Exercise1/String.h @@ -0,0 +1,18 @@ +#pragma once + +class String { + 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); + + String(const char* str); +}; -- cgit v1.2.3