Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class String
- {
- public:
- String() //constructor with no arguments
- :str(NULL),
- size(0)
- {
- }
- String(int size) //constructor with one argument
- :str(NULL),
- size(size)
- {
- str = new char[size];
- }
- ~String() //destructor
- {
- delete [] str;
- };
- private:
- char *str;
- int size;
- }
Advertisement
Add Comment
Please, Sign In to add comment