//File : Lab1.cpp (Laboratory / quiz exercise) //Author : Andre Long //Due : August 25, 2004 //Description : This program will create a class which acts simular to the "string class" // but uses charactor arrays and dynamic memory allocation to adjust it's size #include using namespace std; class HomemadeString { private: char* ptr; public: HomemadeString( ) { ptr = new char[1]; *ptr = '\0'; cout<<"Default Constructor Called!!!"<<"\n"; } HomemadeString(char* bike) { ptr = new char[strlen(bike) +1]; strcpy(ptr, bike); } ~HomemadeString( ) { cout<<"Destructor Executed!!!!"<<"\n"; delete ptr; } char* print() { return ptr; } }; int main ( ) { HomemadeString A = "Hello"; cout<<" Memory space A contains: "<