Thread: Error, not sure what it means.

  1. #1
    1479
    Join Date
    Aug 2003
    Posts
    253

    Error, not sure what it means.

    I have a project completed and I am getting an error and I don't know what it means. Here is the code that I think is causing the problem..
    Code:
    #ifndef Game_H
    #define Game_H
    
    #include <windows.h>
    #include <stdio.h>
    #include "ConLib.h"
    #include "Player.h"
    
    
    enum GameStatus
    {
      GameMainMenu     =1,
      GameRunning      =2,
      GamePaused       =3,
      GameWon          =4,
      GameLostLife     =5,
      GameLost         =6,
      GameExit         =7,
      GameSplashScreen =8
    };
    
    enum GameDifficulty
    {
      GameEasy         =1,
      GameMedium       =2,
      GameDifficult    =3
    }
    
    class CGame
    {
          private:
                  
                  ConLib *  m_Console;
                  int       m_LastAction;
                  
                  int       m_GameStatus;
                  COORD     m_Arena;
                  CPlayer   m_Player;
                  COORD *   m_Monsters;
                  int       m_MonstersNumber;
          
          public:
                 
                 CGame();
                 CGame (ConLib * Console);
                 ~CGame ();
                 
                 void ShowSplash (void);
                 void ShowMenu (void);
                 void ShowGame (void);
                 void ShowWon (void);
                 void ShowLostLife (void);
                 void ShowLost (void);
                 void ShowExit (void);
                 void Show (void);
                 
                 void ProcessSplash (void);
                 void ProcessMenu (void);
                 void ProcessGame (void);
                 void ProcessWon (void);
                 void ProcessLostLife (void);
                 void ProcessLost (void);
                 void ProcessExit (void);
                 void ProcessTurn (void);
                 void Process (void);
                 void SetConsole (ConLib * Console);
                 
                 void StartNewGame (int Difficulty);
                 void EndGame (void);
                 void CheckCollisions ();
                 int GetAction (void);
                 int GetStatus (void);
                 void MoveMonsters (void);
    }; <---Error points me to this line
    
    #endif
    Error:
    In file included from Game.cpp
    multiple types in one declaration
    [Build Error] [Game.o] Error 1

    I have no idea what is going wrong.
    Knowledge is power and I want it all

    -0RealityFusion0-

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    enum GameDifficulty
    Is missing its closing ;
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. What does this code means?
    By junkeat90 in forum C++ Programming
    Replies: 6
    Last Post: 01-14-2008, 05:03 AM
  2. can u help me wht this command means
    By cnu_sree in forum C Programming
    Replies: 2
    Last Post: 10-27-2007, 05:57 AM
  3. Replies: 2
    Last Post: 05-15-2007, 03:30 AM
  4. what does "close wait" and "fin_wait2" means?
    By hanhao in forum Networking/Device Communication
    Replies: 0
    Last Post: 07-18-2005, 05:14 AM
  5. Can someone explain to me what this code means
    By Shadow12345 in forum C++ Programming
    Replies: 3
    Last Post: 12-22-2002, 12:36 PM