Recursive error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Safo
    New Member
    • Jan 2008
    • 6

    Recursive error

    Hi everybody.
    I created following code:

    #include "SDL.h"

    const int WINDOW_WIDTH = 640;
    const int WINDOW_HEIGHT = 480;
    const char* WINDOW_TITLE = "SDL_Start" ;

    int main(int argc, char **argv)
    {
    SDL-Init(SDL_INIT_V IDEO);
    SDL_Surface* screen = SDLVideoMode (WINDOW_WIDTH,
    WINDOW_HEIGHT, 0,
    SDL_HWSURFACE | SDL_DOUBLEBUF );
    SDL_WM_SetCapti on (WINDOW_TITLE, 0);
    SDL_Surface* bitmap = SDL_LoadBMP("ba t.bmp");
    SDL_Rect source;
    source.x = 24;
    source.y = 63;
    source.w = 65;
    source.h = 44;

    SDL_Rect destination;
    destination.x = 100;
    destination.y = 100;
    destination.w = 65;
    destination.h = 44;


    SDL_Event event;
    bool gameRunning = true;

    while (gameRunning)
    {
    if (SDL_PollEvent( &event))
    {
    if (event.type == SDL_QUIT)
    {
    gameRunning = false;
    };
    };
    };

    SDL_BlitSurface (bitmap, &source, screen, &destination );
    SDL_Flip(screen );

    };
    SDL_FreeSurface (bitmap);
    SDL_QUIT();

    return 0;
    }

    Then there were error and warning:
    warning C4182: #include nesting level is 363 deep; possible infinite recursion
    Fatal error C1076: compiler limit: internal heap limit reached; use /Zm to specify a higher limit
  • Killer42
    Recognized Expert Expert
    • Oct 2006
    • 8429

    #2
    This is the Visual Basic forum. What language is that?

    Comment

    • Safo
      New Member
      • Jan 2008
      • 6

      #3
      Originally posted by Killer42
      This is the Visual Basic forum. What language is that?
      This is Visual C++ landuage.

      Comment

      Working...