By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,084 Members | 1,969 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,084 IT Pros & Developers. It's quick & easy.

Recursive error

P: 6
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_VIDEO);
SDL_Surface* screen = SDLVideoMode (WINDOW_WIDTH,
WINDOW_HEIGHT, 0,
SDL_HWSURFACE | SDL_DOUBLEBUF );
SDL_WM_SetCaption (WINDOW_TITLE, 0);
SDL_Surface* bitmap = SDL_LoadBMP("bat.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
Jan 27 '08 #1
Share this Question
Share on Google+
2 Replies


Expert 5K+
P: 8,434
This is the Visual Basic forum. What language is that?
Jan 27 '08 #2

P: 6
This is the Visual Basic forum. What language is that?
This is Visual C++ landuage.
Jan 27 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.