📄 08_01.cpp
字号:
// 08_01.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
using namespace std;
class A{
private:
int x;
void f1(){cout << "private function." << endl;}
protected:
int y;
void f2(){cout << "protected function." << endl;}
public:
int z;
void f3(){cout << "public function." << endl;}
};
class B: public A{
public:
void test(){
A a;
a.x = 10;
a.y = 10;
a.z = 10;
a.f1();
a.f2();
a.f3();
}
};
int main(int argc, char* argv[])
{
B b;
b.test();
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -