摘要: 1 #include<iostream> 2 class Boat;//必须事先声明 3 class Car 4 { 5 int size; 6 public: 7 void setSize(int j){size=j;} 8 int getSize(){return size;} 9 friend int leisure(int time,Car& aobj,Boat& bobj);10 };11 class Boat:Car//此处的Car可要可不要12 {13 int size;14 public:15 void setSize(int ... 阅读全文
posted @ 2013-05-30 22:01 herizai 阅读(150) 评论(0) 推荐(0) 编辑