SDL troubles

closed account (jw6XoG1T)
i decided to start learning SFML and i looked up the instructions on how to install it to VC++ 2010. I did everything perfectly. Now here's the problem....

I tried doing this tutorial from Lazyfoo.com and for some reason when i compile the program the only thing that shows up is a blank black screen. Any help? Here's the code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include <SDL.h>
#include <iostream>

int main(int argc, char* args[] )
{
	//The images

	SDL_Surface* hello = NULL;
	SDL_Surface* screen = NULL;

	//Start SDL

	SDL_Init (SDL_INIT_EVERYTHING);

	//Set Screen

	screen = SDL_SetVideoMode(640, 480, 32, SDL_SWSURFACE);

	//Load Image

	hello = SDL_LoadBMP("helloworld.bmp");

	//Apply image to screen

	SDL_BlitSurface(screen, NULL, hello, NULL);
	SDL_Flip(screen);
	SDL_Delay(2000);

	SDL_FreeSurface(hello);

	//Quit SDL

	SDL_Quit();


	system("pause");
	return 0;
}
Topic archived. No new replies allowed.