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

📄 08_03.cpp

📁 一些C++的课件和实验源代码
💻 CPP
字号:
// 08_03.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <iostream>
using namespace std;

class A{
private:
	int x;
protected:
	int y;
public:
	int z1, z2;

private:
	void f1(){cout << "private function." << endl;}
protected:
	void f2(){cout << "protected function." << endl;}
public:
	void f3(){cout << "public function." << endl;}
	void f4(){cout << "public function." << endl;}
};

class B: A{
public:
	A::z2;
	A::f4;
};


int main(int argc, char* argv[])
{
	B b;
	b.x = 0;
	b.y = 0;
	b.z1 = 0;
	b.z2 = 0;
	b.f1();
	b.f2();
	b.f3();
	b.f4();

	return 0;
}

⌨️ 快捷键说明

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