// system include files // #include #include // define a simple class // class Toaster { protected: // define some data // char* str_d; long len_d; long width_d; float weight_d; // define some simple functions // public: Toaster(float weight_a = 27.0) { str_d = new char[10]; len_d = (long)0; width_d = (long)0; weight_d = weight_a; } ~Toaster() { fprintf(stdout, "... deallocating memory ...\n"); if (str_d != (char*)NULL) { delete [] str_d; str_d = (char*)NULL; } } // define some functions // bool display(FILE* fp, char* delim = (char*)"ECE 1111"); bool set_value(long len_a = 39, long width_a = 27, float weight_a = 99.9); private: // end of class };