Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef STRING_H
- #define STRING_H
- #include <iostream>
- #include <cstring>
- class String
- {
- public:
- String ();
- ~String ();
- String (const String &);
- String (String &&);
- String (const char);
- String (const char *);
- String &operator= (const String &);
- String &operator= (String &&);
- friend std::ostream &operator<< (std::ostream &, const String &);
- friend std::istream &operator>> (std::istream &, String &);
- friend String operator+ (const String &, const String &);
- private:
- size_t str_ctored_size = 0;
- size_t edge = 20;
- char * str = nullptr;
- inline void free ();
- inline void allocate (size_t);
- inline void destruct ();
- };
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement