Website Summary Files Commits Branches @commit @diff @stats
path: root / Sem. 09 / MyString (with move) / MyString.h
diff options
context:
space:
mode:
1 files changed, 4 insertions, 6 deletions
-rw-r--r--Sem. 09/MyString (with move)/MyString.h10
diff --git a/Sem. 09/MyString (with move)/MyString.h b/Sem. 09/MyString (with move)/MyString.h
index 57c298a..9e300d6 100644
--- a/Sem. 09/MyString (with move)/MyString.h
+++ b/Sem. 09/MyString (with move)/MyString.h
@@ -8,15 +8,16 @@ class MyString
void copyFrom(const MyString& other);
void free();
-
- void concat(const MyString& other);
+
+ void concatFrom(const MyString& other);
public:
MyString();
MyString(const char*);
+ MyString(size_t n); //convert constructor
MyString(const MyString&);
-
+
MyString(MyString&&); //move constructor that accepts rvalue;
MyString& operator=(const MyString& other);
@@ -40,6 +41,3 @@ MyString operator+(const MyString& lhs, const MyString& rhs);
bool operator==(const MyString& lhs, const MyString& rhs);
bool operator<=(const MyString& lhs, const MyString& rhs);
bool operator<(const MyString& lhs, const MyString& rhs);
-
-
-//MyString name = "sdfsdf"