But what is your error message ?

"It doesn't work" doesn't help us figure out what to suggest.

> temp = SDL_LoadBMP("./sprite.bmp");
Like I said in your other thread, add some...