#ifdef WIN32#pragma comment(lib, "SDL.lib")#pragma comment(lib, "SDLmain.lib")#endif#include "SDL.h"int main( int argc, char* argv[] ){ SDL_Init( SDL_INIT_VIDEO ); atexit( SDL_Quit ); SDL_Surface * screen = SDL_SetVideoMode( 640, 480, 24, SDL_ANYFORMAT|SDL_DOUBLEBUF ); SDL_Surface * img = SDL_LoadBMP( "filename.bmp" ); SDL_Rect dest; dest.x = 200; dest.y = 300; SDL_Event event; SDL_Event a; SDL_Event b; SDL_Event Event ;SDL_Rect coord; coord.x = 100; coord.y = 100; while(true); {SDL_BlitSurface(img,NULL,screen, &dest); SDL_Flip( screen ); // wait for user exit while( !( SDL_PollEvent(&event) && event.type == SDL_QUIT ) ) {} SDL_PollEvent(&Event);if(Event.type == SDL_MOUSEBUTTONDOWN){ if(Event.button.button == SDL_BUTTON_LEFT) { SDL_Surface *imi =SDL_LoadBMP("ad.bmp") ;while(true); { SDL_BlitSurface(imi,NULL,screen,&coord) ;SDL_Flip(screen); } } } return 0;}
c:\Documents and Settings\Randle\Desktop\randyx''s stuff\PROJECTS\SDL\opp2604957sdl.cpp(44): fatal error C1075: end of file found before the left brace ''{'' at ''c:\Documents and Settings\Randle\Desktop\randyx''s stuff\PROJECTS\SDL\opp2604957sdl.cpp(8)'' was matched