// file: lecture_26/example.cc // // local include files // #include "t.h" // define a main program // int main(int argc, char** argv) { // declare a string // char* joe = (char*)"joe"; // declare an object // Toaster bosch; Toaster amazon; Toaster::TYPES foo = Toaster::CUISENART; Toaster::TYPES goo = Toaster::BOSCH; fprintf(stdout, "the value of %s = %d (%s)\n", "foo", foo, "CUISENART"); fprintf(stdout, "the value of %s = %d (%s)\n", "goo", goo, "BOSCH"); // bool flag = true; // flag = false; // flag = jjjjj; // set the debug level // bosch.debug_level_d = Toaster::BRIEF; // call a function // bosch.set_value(99, 99, 99.999); amazon.set_value(-1, -1, -1.1111); // demonstrate the const declaration // Toaster sum = bosch + amazon * bosch - amazon; // exit gracefully // return(0); }