// system include files // #include #include // define a simple class // class Foo { // define protected data // protected: // define some data // static char d; char str[5]; float x[5]; // define public functions // public: Foo() { fprintf(stdout, "the address of d is: %u\n", &d); fprintf(stdout, "the address of str is: %u\n", str); fprintf(stdout, "the address of x is: %u\n", x); } ~Foo() {} // method: myprint // void myprint() { fprintf(stdout, "hello world\n"); } // end of class };