Website Summary Files Commits Branches @commit @diff @stats
path: root / Sem. 11 / Examples / Bar / MyString / MyString.h
diff options
context:
space:
mode:
Commit7da5cae134b3f5dc0e3bc6641f2ae5364fa5f512 (patch)
Author
 angeld55 <angel_dimitriev@abv.bg>
2022-05-24 00:13:26 +0300
Committer
 angeld55 <angel_dimitriev@abv.bg>
2022-05-24 00:13:26 +0300
Files1d2b86be84b35fd6bb2bc8bde340633b6e6997aa /Sem. 11/Examples/Bar/MyString/MyString.h
Object-oriented_programming_FMI-7da5cae134b3f5dc0e3bc6641f2ae5364fa5f512.tar
Object-oriented_programming_FMI-7da5cae134b3f5dc0e3bc6641f2ae5364fa5f512.tar.gz
Object-oriented_programming_FMI-7da5cae134b3f5dc0e3bc6641f2ae5364fa5f512.zip
Parent2b5e881d9b4e6f421521ef0a6334fc107d29bda0 (diff)
added check to MyString for length when input comes for a stream
1 files changed, 4 insertions, 5 deletions
-rw-r--r--Sem. 11/Examples/Bar/MyString/MyString.h9
diff --git a/Sem. 11/Examples/Bar/MyString/MyString.h b/Sem. 11/Examples/Bar/MyString/MyString.h
index b37733a..9e300d6 100644
--- a/Sem. 11/Examples/Bar/MyString/MyString.h
+++ b/Sem. 11/Examples/Bar/MyString/MyString.h
@@ -9,12 +9,15 @@ class MyString
void copyFrom(const MyString& other);
void free();
+ 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);
@@ -23,7 +26,6 @@ public:
~MyString();
size_t getSize() const;
- void concat(const MyString& other);
const char* c_str() const;
@@ -39,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" \ No newline at end of file