class Ba { public: Ba(int x):a(x) {} void print() { cout<<a<<endl; } private: int a; }; tpo听力原文class Derived:public Ba { public: Derived(int x):Ba(x-1),b(x){} void print(){}; private: int b; }; |
class A bandage{ public: 红筹股 A(int x):a(x){} virtual void print(){cout<<a<<endl;} private: int a; }; class B:public A { public: B(int x):A(x-1),b(x){} virtual void print(){cout<<b<<endl;} private: int b; }; |
Class A { }; |
本文发布于:2023-05-19 15:10:10,感谢您对本站的认可!
本文链接:https://www.wtabcd.cn/fanwen/fan/78/695827.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |