摘要: #include <string> #include <iostream> using namespace std; namespace { class Animal { public: Animal() { cout << "基类调用虚函数…" << endl; cout << GetInfo() 阅读全文
posted @ 2024-08-23 20:31 double64 阅读(16) 评论(0) 推荐(0)
摘要: #include <string> #include <iostream> using namespace std; namespace { class Animal { public: string GetInfo() { return "我是动物"; } }; class Dog :public 阅读全文
posted @ 2024-08-23 19:42 double64 阅读(9) 评论(0) 推荐(0)