How do I change this code from c++ to c if I can't use "::" to denote enum variables/elements? Also, I keep getting an "identifier 'GameState' is unidentifed" error message any time it's used outside the enum declaration that seems to be related to this problem somehow?
Header
void gameStateManager();
typedef enum GameState
{
MENU, PLAY, EXIT
};
GameState gameState;
Source
void gameStateManager()
{
switch (gameState)
{
case GameState::MENU:
//button press selections that lead to Menu
break;
case GameState::PLAY:
//button press selections that lead to Play
break;
case GameState::EXIT:
//button press selections that lead to Exit
SDL_QUIT;
break;