   Sorry, annother question
  Thanks for helping me earlier =)I have a new problem I cannot solve...My little samurai picture does not show up on screen, and every time I execute the program, a window comes up that says "encounter a problem and needs to close" This is very confusing, I need some more help. I suspect there are more problems... I don't know why, but I think there are.#include <allegro.h>int Xpos = 320;int Ypos = 240;int BXpos = 320;int BYpos = 240;int direction = 4;BITMAP* buffer;BITMAP*facenorthwest = load_bitmap("facenorthwest.bmp",0);BITMAP*facenortheast = load_bitmap("facenortheast.bmp",0);BITMAP*facesouthwest = load_bitmap("facesouthwest.bmp",0);BITMAP*facesoutheast = load_bitmap("facesoutheast.bmp",0);void controlall(){BXpos = Xpos;BYpos = Ypos;if(key[KEY_UP]){Xpos --;Ypos --;direction = 1;}else if(key[KEY_LEFT]){  Xpos --;  Ypos ++;  direction = 2;}else if(key[KEY_RIGHT]){ Xpos ++; Ypos --; direction = 3;}else if(key[KEY_DOWN]){Xpos ++;Ypos ++;direction = 4;}}void drawing(){if(direction == 1){   masked_blit(facenorthwest,buffer,0,0,Xpos,Ypos,64,64);   masked_blit(facenorthwest,buffer,0,0,BXpos,BYpos,64,64);   draw_sprite(screen,buffer,0,0);}else if(direction ==2){   masked_blit(facesouthwest,buffer,0,0,Xpos,Ypos,64,64);   masked_blit(facesouthwest,buffer,0,0,BXpos,BYpos,64,64);   draw_sprite(screen,buffer,0,0);}else if(direction ==3){   masked_blit(facenortheast,buffer,0,0,Xpos,Ypos,64,64);   masked_blit(facenortheast,buffer,0,0,BXpos,BYpos,64,64);   draw_sprite(screen,buffer,0,0);}else if(direction ==4){   masked_blit(facesoutheast,buffer,0,0,Xpos,Ypos,64,64);   masked_blit(facesoutheast,buffer,0,0,BXpos,BYpos,64,64);   draw_sprite(screen,buffer,0,0);}clear_bitmap(buffer);}int main(int argc, const char* argv[]){    allegro_init();    install_keyboard();    set_color_depth(16);    set_gfx_mode(GFX_AUTODETECT,640,480,0,0);   buffer = create_bitmap(640,480);   while(!key[KEY_ESC])    {    controlall();    drawing();    }    destroy_bitmap(buffer);    destroy_bitmap(facenorthwest);    destroy_bitmap(facenortheast);    destroy_bitmap(facesouthwest);    destroy_bitmap(facesoutheast);   clear_keybuf();    allegro_exit();    return 0;}END_OF_MAIN();
Quote:a window comes up that says "encounter a problem and needs to close" This means you're doing something in your code to make the program crash.Run your program from the debugger (Debug->Start in MSVS), and when it crashes the debugger should tell you which line it crashed on.[Edit] It could be because you're loading your bitmaps before you initialise Allegro...Try changing your declarations up the top to:BITMAP* facenorthwest = 0;BITMAP* facenortheast = 0;BITMAP* facesouthwest = 0;BITMAP* facesoutheast = 0;And then add this code after "buffer = create_bitmap(640,480);":facenorthwest = load_bitmap("facenorthwest.bmp",0);facenortheast = load_bitmap("facenortheast.bmp",0);facesouthwest = load_bitmap("facesouthwest.bmp",0);facesoutheast = load_bitmap("facesoutheast.bmp",0);;  Oh, thank you so much! I did not know these sort of problems even existed =D   