#include class C { public: char* salutation; C() { salutation=0; } // explicit default constructor C(char* c) { // initializing constructor salutation=new char[strlen(c)+1]; strcpy(salutation,c); }//end constructor C(const C& c) { // copy constructor salutation=new char[strlen(c.salutation)+1]; strcpy(salutation,c.salutation); }//end constructor ~C() { if (salutation) delete[] salutation; } // destructor };//end class C // function doit ------------------------------------------------ void doit(C d) { cout << d.salutation << '\n'; }//end doit // function main ------------------------------------------------ int main() { C c("hey Joe"); doit(c); return 0; }//end main