多态~
摘要:
1 #include <iostream> 2 using namespace std; 3 4 class Person 5 { 6 public: 7 int age; 8 int name; 9 virtual void pee()10 {11 cout<<"man stand and woman sit"<<endl;12 }13 };14 15 class man : public Person16 {17 void pee()18 {19 cout<<"man stand~"<<en 阅读全文
posted @ 2012-05-06 14:48 mydjm 阅读(147) 评论(0) 推荐(0) 编辑