摘要: C++语言: Codee#2574101 /*02 私有继承成员的公有化03 */04 class Pet05 {06 public:07 char eat() const08 {09 return 'a';10 }11 int speak() const12 {13 return 2;14 }15 float sleep() const16 {17 return 3.0;18 }19 float sleep(int) const20 {21 return 4.0;22 }23 };24 25 class Goldfish: Pet //private in... 阅读全文
posted @ 2012-03-07 20:33 strorehouse 阅读(183) 评论(0) 推荐(0) 编辑