#include <cstring>#include <algorithm>class string{ char* data;public: string(const char* p) { size_t size = strlen(p) + 1; data = new char[size]; memcpy(data, p, size); }