?? privmult.cpp
字號:
#include <iostream.h>
class One {
public:
One(void) { cout << "Constructor for One\n";
one = 1; };
int one;
};
class Two {
public:
Two(void) { cout << "Constructor for Two\n";
two = 2; };
int two;
};
class Three {
public:
Three(void) { cout << "Constructor for Three\n";
three = 3; };
int three;
};
class Derived: private One, private Three, public Two {
public:
Derived(void) : One(), Two(), Three() {
cout << "Derived constructor called\n"; };
void show_value(void) { cout << one << two << three << endl; };
};
void main(void)
{
Derived my_class;
my_class.show_value();
cout << my_class.two;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -