Now we can initialize and destroy once
void String::init(const char* s)
{
data = new char[strlen(s) + 1];
strcpy(data, s);
}
void String::destroy()
{
delete[] data;
}
Previous slide
Next slide
Back to first slide
View graphic version