Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.79 KB | None | 0 0
  1. #pragma ones
  2.  
  3. #include <ostream>
  4.  
  5.  
  6. class String
  7. {
  8. public:
  9.     String();
  10.     String(const char* cStyleString);
  11.     explicit String(char symbol, unsigned int amount);
  12.     String(const String& string);
  13.  
  14.     ~String();
  15.  
  16.     void append(const char* cStyleString);
  17.     void append(const String& string);
  18.  
  19.     String& operator=(const String& string);
  20.     String& operator+=(const String& string);
  21.     String operator+(const String& string);
  22.  
  23.     friend std::ostream& operator<<(std::ostream& wave, const String& string);
  24.  
  25.     void print() const;
  26.     unsigned int size() const;
  27.     void clear();
  28.  
  29. private:
  30.     char* mData;
  31.     unsigned int mDataSize;
  32.     void initialization(const char* cStyleString);
  33.     char* concatenation(const char* firstString, const char* secondString);
  34. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement