随笔分类 -  继承

摘要:#include <iostream>using namespace std;struct A{A(){std::cout << "A";}};struct B: public A{B(){std::cout << "B";}};struct C{C(){std::cout << "C";}B b;A a;};int main(){C c;return 0;}ABAC 阅读全文
posted @ 2012-06-28 10:59 byfei 阅读(127) 评论(0) 推荐(0) 编辑