摘要:
注意点:class base{protected://抽象类成员变量要用protected,而用private子类明显不可以调用 double x;public: base(double a){x=a;} virtual void s()=0;//加个const就不对了 virtual void v()=0;};View Code #include<iostream>using namespace std;class base{protected: double x;public: base(double a){x=a;} virtual void s()=0;//加个const就 阅读全文
posted @ 2011-05-02 19:57 huhuuu 阅读(245) 评论(0) 推荐(0) 编辑