热门标签
更多>
搜索结果
查询Tags标签: redefine,共有 2条记录-
Effective C++ 笔记 —— Item 36: Never redefine an inherited non-virtual function.
Consider:class B { public:void mf();// ... };class D : public B { /*...*/ };D x; // x is an object of type DB *pB = &x; // get pointer to x pB->mf();D * pD = &x; // get pointer to x pD->mf();Thats because in both cases youre invoking th…
2021/9/28 22:12:38 人评论 次浏览 -
Effective C++ 笔记 —— Item 36: Never redefine an inherited non-virtual function.
Consider:class B { public:void mf();// ... };class D : public B { /*...*/ };D x; // x is an object of type DB *pB = &x; // get pointer to x pB->mf();D * pD = &x; // get pointer to x pD->mf();Thats because in both cases youre invoking th…
2021/9/28 22:12:38 人评论 次浏览