title: Can't load bitmap, ALLEGRO C++ CODEBLOCKS
body: <p>My problem is I can't load bitmap to allegro after compiling windows stops working. I tried different bitmaps with different color depths but it still doesn't work.</p>
  
  <pre><code>#include &lt;allegro.h&gt;
  
  int main(int argc, char *argv[])
  {
    allegro_init();
    install_keyboard();
  
    set_color_depth(16);
    set_gfx_mode(GFX_AUTODETECT_WINDOWED, 800, 600, 0,0);
    set_window_title("The Game");
  
    BITMAP *bmp = create_bitmap(800,600);
    clear_bitmap(bmp);
    BITMAP *BG = load_bitmap("tlotlo.bmp",NULL);
  
    while(!key[KEY_ESC])
    {
    blit(bmp, screen, 0,0,0,0, bmp-&gt;w, bmp-&gt;h);
    blit(BG, bmp, 0,0,0,0, BG-&gt;w, BG-&gt;h);
    }
  
    destroy_bitmap(bmp);
    destroy_bitmap(BG);
  
  
    return 0;
  
  
  }
  END_OF_MAIN();
  </code></pre>