Page 1 of 1

missing type specifier - int assumed SDL clean_up();

Posted: Fri Jul 31, 2009 12:49 am
by RandomDever

Code: Select all

void clean_up()
{
    //Free the surfaces
    SDL_FreeSurface( background );

    //Free the sound effects
    Mix_FreeChunk( scratch );
    Mix_FreeChunk( high );
    Mix_FreeChunk( med );
    Mix_FreeChunk( low );

    //Free the sound effects
    Mix_FreeMusic( music );

    //Close the font
    TTF_CloseFont( font );

    //Quit SDL_mixer
    Mix_CloseAudio();

    //Quit SDL_ttf
    TTF_Quit();

    //Quit SDL
    SDL_Quit();
}
Every time I use this function it gives me a missing type specifier message.........
Then it gives me this:
'int clean_up(void)' : overloaded function differs only by return type from 'void clean_up(void)'
WTF!?!?!?!?!?!
VC++ Just created an error by itself. :| :| :| :| :| :| :| :| :|

Re: missing type specifier - int assumed SDL clean_up();

Posted: Fri Jul 31, 2009 1:44 am
by short
Every time I use this function it gives me a missing type specifier message.........
Then it gives me this:
'int clean_up(void)' : overloaded function differs only by return type from 'void clean_up(void)'
WTF!?!?!?!?!?!
VC++ Just created an error by itself. :| :| :| :| :| :| :| :| :|
Is your prototype of you cleanup function set as a int return type on accident?
This:

Code: Select all

int clean_up();
instead of

Code: Select all

void clean_up();
??