📄 bmw1.cpp
字号:
/*
* bmw1.cpp: This example illustrates virtual base classes with virtual functions.
* It is modelled after Stroustup's BMW (Borders, Menu, Window) example from
* section 10.10c of the Annotated C++ Reference Manual (p233-235).
*
* Here, we force a second copy of the vtables for BMW to be compiled.
* armlink will eliminate all but one copy.
*/
#include "bmw.h"
static BMW bmw;
void gg()
{
BMW *pbmw = &bmw;
pbmw->f(); // should be BW::f():
pbmw->g(); // should be MW::g();
pbmw->h(); // should be BMW::h();
pbmw->k(); // should be W::k();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -