Advertisement
Guest User

Untitled

a guest
Dec 13th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. #pragma once
  2. #include <iostream>
  3. #include <cstring>
  4.  
  5. using namespace std;
  6.  
  7. class StringWrapper{
  8. public:
  9. StringWrapper() = default;
  10. StringWrapper(const char* text);
  11. StringWrapper(const StringWrapper& str);
  12. ~StringWrapper();
  13.  
  14. friend StringWrapper operator*(const int val, const StringWrapper str);
  15.  
  16. friend ostream& operator<<(ostream& out, const StringWrapper& str);
  17. const bool operator==(const StringWrapper cpr) const;
  18. const StringWrapper operator+(const char* str) const;
  19. const StringWrapper operator+(const StringWrapper& str) const;
  20. StringWrapper operator*(const int& val) const ;
  21. StringWrapper & operator=(StringWrapper wrapper);
  22.  
  23. private:
  24. char* _text = nullptr;
  25. int _len;
  26. };
  27.  
  28. StringWrapper operator*(const int val, const StringWrapper str);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement