//ボーリングクラス //スコア構造体 typedef struct{ int m_first; //一投目 int m_second; //二投目 int m_third; //三投目(10フレーム用) int m_total; //合計 } Score; //データファイル構造体 typedef struct { int m_score[ 30 ]; //スコア(3×10フレーム) char m_date[ 64 ]; //日付 } DataFile; //ボーリングクラス class Bawling { private: Score m_score[ 10 ]; //スコア char m_date[ 64 ]; //日付 //フラグ enum _flag{ eNORMAL_FLAG = 0x00000001, //通常 eSTRIKE_FLAG = 0x00000002, //ストライク eSPARE_FLAG = 0x00000004, //スペア }eFLAG; public: //定数 enum _def{ eUNDECIDED = -1, //スコア未決定 eMAX_FRAME = 10, //フレーム数 }eDEFINE; //コンストラクタ Bawling(); //初期化 void Initialize( void ); //スコア入力 void InputScore( int frame, int first, int second = eUNDECIDED, int third = eUNDECIDED ); //スコア計算 void CalScore( int frame ); //日付入力 void InputDate( char* date ); //結果表示 void DispResult( void ); };