I have the code
void switchstate(gamestates state) --line 53
{ --line 54
switch(state)
case state_title:
title();
break;
case state_about:
break;
case state_game:
break;
case state_battle:
break;
}
enum gamestates
{
state_title, state_about, state_game, state_battle,
};
int main( int argc, char* args[] )
{
gamestates currentstate = state_title;
startup();
load_resources();
switchstate(currentstate); --line 169
return 0;
}
and when I try to compile I get the errors:
\main.cpp:53: error: 'gamestates' was not declared in this scope
\main.cpp:54: error: expected ',' or ';' before '{' token
\main.cpp: In function 'int SDL_main(int, char**)':
\main.cpp:169: error: 'switchstate' cannot be used as a function
I've never used enumerations before so I'm confused on what's not working.