随笔分类 -  c++ learning

摘要:在虚表中,派生类虚函数指针会替代基类的对应的虚函数指针的位置//析构函数:派生类析构函数首先调用派生类析构,然后调用父类析构函数;与构造函数顺序相反多态还有个关键之处就是一切用指向基类的指针或引用来操作对象,所以要实现子类接口的重写,必须使用抽象类。1)虚函数按照其声明顺序放于表中。2)父类的虚函数... 阅读全文
posted @ 2014-11-16 21:04 cool_coder 阅读(132) 评论(0) 推荐(0)
摘要:1.when we wanna share const variables;we use the keywordexternon both its definition and declaration(s):2.Once initialized, a reference remains bound ... 阅读全文
posted @ 2014-11-16 20:57 cool_coder 阅读(147) 评论(0) 推荐(0)