상속성 사용하고싶습니다 ㅜ

조회수 407회
void Interpace::BetResult(int nWinner1)
{
     system("cls");
     Line();
     cout<<'\t'<<nWinner1<<"번 마가 승리하였습니다."<<endl;
     cout<<endl;
     cout<<'\t'<<"당신의 예상: "<<nHorseChoice1<<"번마"<<endl; 
     if(nWinner1 == nHorseChoice1)
     {
        cout<<'\t'<<"성공하였습니다."<<endl;
        nGold =  nGold + (nBetGold * 4);
     }
     else
     {
        cout<<'\t'<<"실패하였습니다."<<endl;
     }
     cout<<endl;
     cout<<'\t'<<"소지금: "<<nGold<<"만원"<<endl;
     system("pause");
}

void Interpace::BetResult(int nWinner1, int nWinner2)
{
    system("cls");
    Line();
    cout<<'\t'<<"1등: "<<nWinner1<<"번 마"<<endl;
    cout<<'\t'<<"2등: "<<nWinner2<<"번 마"<<endl;
    cout<<endl;
    cout<<'\t'<<"당신의 예상: "<<nHorseChoice1<<"번 마, "<<nHorseChoice2<<"번 마"<<endl;
    if(nWinner1 == nHorseChoice1)
    {
        if(nWinner2 == nHorseChoice2)
        {
            cout<<'\t'<<"성공하였습니다."<<endl;
            nGold =  nGold + (nBetGold * 3);
        }
    }
    else if(nWinner1 == nHorseChoice2)
    {
        if(nWinner2 == nHorseChoice1)
        {
            cout<<'\t'<<"성공하였습니다."<<endl;
            nGold =  nGold + (nBetGold * 3);
        }
    }
    else
     {
        cout<<'\t'<<"실패하였습니다."<<endl;
     }
     cout<<endl;
     cout<<'\t'<<"소지금: "<<nGold<<"만원"<<endl;
     system("pause");
}

void Interpace::BetResult(int nWinner1, int nWinner2, int flag)
{
    system("cls");
    Line();
    cout<<'\t'<<"1등: "<<nWinner1<<"번 마"<<endl;
    cout<<'\t'<<"2등: "<<nWinner2<<"번 마"<<endl;
    cout<<endl;
    cout<<'\t'<<"당신의 예상"<<endl;
    cout<<'\t'<<"1등: "<<nHorseChoice1<<"번 마"<<endl;
    cout<<'\t'<<"2등: "<<nHorseChoice2<<"번 마"<<endl;
    if(nWinner1 == nHorseChoice1)
    {
        if(nWinner2 == nHorseChoice2)
        {
            cout<<'\t'<<"성공하였습니다."<<endl;
            nGold =  nGold + (nBetGold * 10);
        }
    }
#pragma once
#include <iostream>
using namespace std;

void Line(void);

enum
{
    START = 1,
    EXIT
};

class Interpace
{
private:
         int           nMenu;
         int           nHorseChoice1;
         int           nHorseChoice2;
         int           nBetGold;
         static int    nGold;
public:
         int    Menu(void);
         int    BetMenu(void);
         int    Betting();
         void   Bet();        //단승 
         void   PlaceBet();   //복승 
         void   DoubleBet();  //쌍승 
         void   BetResult(int nWinner1);                            //단승
         void   BetResult(int nWinner1, int nWinner2);              //복승
         void   BetResult(int nWinner1, int nWinner2, int flag);    //쌍승
};

```BetResult를 내일까지 상속화 해야되는데 어떻게 하면 좋을까요? 
  • (•́ ✖ •̀)
    알 수 없는 사용자
  • 무엇을 상속하라는 건가요? 정영훈 2019.12.3 04:06

답변을 하려면 로그인이 필요합니다.

프로그래머스 커뮤니티는 개발자들을 위한 Q&A 서비스입니다. 로그인해야 답변을 작성하실 수 있습니다.

(ಠ_ಠ)
(ಠ‿ಠ)