cant put a picture in

#include <cstdlib>
#include <iostream>
#include "SDL.h"
using namespace std;

int main(int argc, char *argv[])
{
bool running = true;

if(SDL_Init(SDL_INIT_EVERYTHING)== -1)
{
running = false;
}
SDL_Surface*screen;
screen= SDL_SetVideoMode(800,600, 32, SDL_HWSURFACE);
if (screen == NULL)
{
running=false;
}
SDL_Event occur;


SDL_Surface*image;
image= SDL_LoadBMP("test.BMP");
while (running == true)
{
SDL_PollEvent (&occur);
if (occur.type==SDL_QUIT)
{
running=false;
}
SDL_FillRect(screen, NULL, 0);
SDL_BlitSurface( image, NULL, screen, NULL);
sdl_Flip(screen);
}

SDL_Quit();
return 0;
}

// it is quiet weird that the compiler said that SDL_Quit(); IS WRONG//
Last edited on
Only problem I can see is that sdl_Flip should be SDL_Flip.
Topic archived. No new replies allowed.