相关代码 |
|
#include class Base { public: void base_message(void) { cout }; class Derived: public Base { public: void derived_message(void) { cout }; void main(void) { Base *base_pointer = new Base; base_pointer->base_message(); base_pointer = new Derived; base_pointer->base_message(); }
相关资源 |
|