#include <string.h>

class MyString
{
public:
	char *data;
	long size;

	MyString()
	{
		data = new char[1];
		data[0] = 0;
		// number of characters + null
		size = 1;
	}

	void clear()
	{
		char *temp = new char[1];
		temp[0] = 0;
		delete data;
		data = temp;
		size = 1;
	}

	~MyString()
	{
		delete data;
	}

	void operator=(char *hop)
	{
		long a=0;
		while(hop[a++]!=0);
		char *temp = new char[a];
		delete data;
		data = temp;
		strcpy(data, hop);
		size = a;
	}

	void operator+=(char *hop2)
	{
		long a=0;
		char *temp;

		while( hop2[a] != 0) a++;
		temp = new char[a+size];
		if( size > 1) strcpy(temp, data);
		strcpy(temp+size-1,hop2);
		delete data;
		data = temp;
		size += a;
	}
};