Cpp クラス 継承 新しいページはコチラ

提供: yonewiki
移動: 案内, 検索
(クラス 継承)
(クラス 継承)
45行: 45行:
 
<span style="color: #ffffff; background-color: #555555; padding: 0px 5px 0px 5px; display: inline-block;">cpp <span>(</span>BaseInheritance.cpp<span>)</span><!-- padding 上 右 下 左-->
 
<span style="color: #ffffff; background-color: #555555; padding: 0px 5px 0px 5px; display: inline-block;">cpp <span>(</span>BaseInheritance.cpp<span>)</span><!-- padding 上 右 下 左-->
 
<syntaxhighlight2 lang="cpp" line>
 
<syntaxhighlight2 lang="cpp" line>
#include "stdafx.h"
+
#include <cstdio>
#include "CBaseInheritance.h"
+
#include "BaseInheritance.h"
  
void CBaseInheritance::CBaseInheritance(int iArgBaseMoney,int iArgBaseMonth){
+
CBaseInheritance::CBaseInheritance(int iArgBaseMoney, int iArgBaseMonth) {
     m_iBase = iArgBaseMoney;
+
     m_iBaseMoney = iArgBaseMoney;
 
     m_iBaseMonth = iArgBaseMonth;
 
     m_iBaseMonth = iArgBaseMonth;
 
     printf("Constructor:CBaseInheritance\n");
 
     printf("Constructor:CBaseInheritance\n");
 
}
 
}
void CBaseInheritance::~CBaseInheritance(){
+
CBaseInheritance::~CBaseInheritance() {
 
     printf("Destructor:~CBaseInheritance\n");
 
     printf("Destructor:~CBaseInheritance\n");
 
}
 
}
void CBaseInheritance::m_fvBaseDispValue(){
+
void CBaseInheritance::m_fvBaseDispValue() {
     printf("Money=%d\n" ,m_iBaseMoney * m_iBaseMonth);
+
     printf("Money=%d\n", m_iBaseMoney * m_iBaseMonth);
 
}
 
}
int CBaseInheritance::m_fiBaseSumMoney(){
+
int CBaseInheritance::m_fiBaseSumMoney() {
 
     return (m_iBaseMoney * m_iBaseMonth);
 
     return (m_iBaseMoney * m_iBaseMonth);
 
}
 
}

2020年7月14日 (火) 00:00時点における版



個人用ツール
名前空間

変種
操作
案内
ツールボックス