Cpp クラス 継承 新しいページはコチラ
提供: yonewiki
(→クラス 継承) |
(→クラス 継承) |
||
| 208行: | 208行: | ||
Constructor:CBaseInheritance() | Constructor:CBaseInheritance() | ||
Constructer:CDeriveInheritance(int,int,int) | Constructer:CDeriveInheritance(int,int,int) | ||
| − | DeriveMoney=47400 | + | DeriveMoney = 47400 |
Destructer:~CDeriveInheritance() | Destructer:~CDeriveInheritance() | ||
Destructor:~CBaseInheritance() | Destructor:~CBaseInheritance() | ||
| 218行: | 218行: | ||
派生クラスを生成させたときの引数の数が一致するものがないときは基底クラスはでは、何もないコンストラクタが呼ばれます。 | 派生クラスを生成させたときの引数の数が一致するものがないときは基底クラスはでは、何もないコンストラクタが呼ばれます。 | ||
| + | |||
| + | |||
| + | メイン関数からは、派生クラスが基底クラスを使っているかどうかは、わからないくらいの状態でプログラムされています。インクルードしているヘッダファイルも基底クラスを直接使わない分には、基底クラス用のヘッダファイルを読み込む必要もないです。 | ||
[[C PlusPlus#C++からの技術|C++]]に戻る | [[C PlusPlus#C++からの技術|C++]]に戻る | ||