#include class C { public: char* salutation; C() { salutation=0; } // explicit default constructor void Mod(char* c) { // allocation failure handled by exception, not in this example salutation= new char[strlen(c)+1]; strcpy(salutation,c); } };//end class C // function main ------------------------------------------------ int main() { C* x = new C[5]; x[2].Mod("hey"); cout << x[2].salutation << \n; return 0; }//end main