📄
字号:
// Test01.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream.h>
class CA
{
public:
CA(int x, int y)
{
m_nX = x;
m_nY = y;
}
protected:
int m_nX;
int m_nY;
};
class CB : public CA
{
public:
CB(int x, int , int z);
void Display();
protected:
private:
int m_nZ;
};
CB::CB(int x, int y, int z)
:CA(x, y)
{
m_nZ = z;
}
void CB::Display()
{
cout << m_nX << " " << m_nY << " " << m_nZ <<endl;
}
void main()
{
CB b(1, 2, 4);
b.Display();
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -