相关代码 |
|
#include #include class Base { public: virtual void show_message(void) { cout virtual void show_reverse(void) = 0; }; class Derived : public Base { public: virtual void show_message(void) { cout virtual void show_reverse(void) { cout }; void main(void) { Base *poly = new Derived; poly->show_message(); poly->show_reverse(); }
相关资源 |
|