📄 ex07.cpp
字号:
#include <iostream.h>
class B1
{
public:
void output();
};
class B2
{
public:
void output();
};
void B1::output()
{
cout<<"call the class B1"<<endl;
}
void B2::output()
{
cout<<"call the class B2"<<endl;
}
class A:public B1,public B2
{
public:
void show();
};
void A::show()
{
cout<<"call the class A"<<endl;
}
void main()
{
A a;
a.output(); //该语句编译时会报错
a.show();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -