myString.h 505 B

123456789101112131415161718
  1. #pragma once
  2. class MyString
  3. {
  4. char* m_pStr; //ñòðîêà-÷ëåí êëàññà
  5. public:
  6. MyString(const char* Str = " ");// êîíñòðóêòîð
  7. MyString(const MyString&); //êîíñòðóêòîð êîïèðîâàíèÿ
  8. MyString(MyString&&); //ïåðåìåùàþùèé êîíñòðóêòîð êîïèðîâàíèÿ
  9. const char* GetString() const; //ìåòîä, êîòîðûé îáåñïå÷èò äîñòóï ê õðàíÿùåéñÿ ñòðîêå
  10. void SetNewString(const char*); //ìåòîä, êîòîðûé áóäåò çàìåíÿòü ñòðîêó íà íîâóþ
  11. ~MyString();//äåñòðóêòîð
  12. };
  13. MyString concatenation(const char* Str, ...);