1

Problem with showing a picture by SDL

view story
linux-howto

https://bbs.archlinux.org – Hello, everyone!I've got a following code:#include <iostream> #include <stdlib.h> #include "SDL/SDL.h" using namespace std; SDL_Surface* load_image(string file) { SDL_Surface *li, *oi; li = SDL_LoadBMP(file.c_str()); if (li != NULL) { oi = SDL_DisplayFormat(li); SDL_FreeSurface(li); } else { cerr << "Error of loading \"" << file << "\"" << endl; return NULL; } return oi; } void apply_surface(int x, int y, SDL_Surface *s, SDL_Surface *d) { (HowTos)