this pointer is added to the class variables implicitly. You can use jyst variable name and write: delete [] text;