⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 08_02.cpp

📁 一些C++的课件和实验源代码
💻 CPP
字号:
// 08_02.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(){
		x = 0;
		y = 0;
		z = 0;
		f1();
		f2();
		f3();
	}
};

int main(int argc, char* argv[])
{
	B b;
	b.test();
	b.f1();
	b.f2();
	b.f3();

	return 0;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -