From 9829b368ce529df277397e3b465fc536fa65ebfd Mon Sep 17 00:00:00 2001 From: Syndamia Date: Thu, 14 Apr 2022 23:53:14 +0300 Subject: Implemented (broken) overall functionality of ex3 of sem 08 --- .../Solutions Sem. 08/ex3/DynStr.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Year 1/Object-oriented Programming/Solutions Sem. 08/ex3/DynStr.h (limited to 'Year 1/Object-oriented Programming/Solutions Sem. 08/ex3/DynStr.h') diff --git a/Year 1/Object-oriented Programming/Solutions Sem. 08/ex3/DynStr.h b/Year 1/Object-oriented Programming/Solutions Sem. 08/ex3/DynStr.h new file mode 100644 index 0000000..8b31da3 --- /dev/null +++ b/Year 1/Object-oriented Programming/Solutions Sem. 08/ex3/DynStr.h @@ -0,0 +1,17 @@ +class DynStr { + char* str; + int length; + + void free(); + void copyFrom(const DynStr& other); + +public: + DynStr(); + DynStr(const char* str); + + DynStr(const DynStr& copy); + DynStr& operator=(const DynStr& other); + ~DynStr(); + + const char* get_str() const; +}; -- cgit v1.3.1-26-gb76a