Unhandled exception in Allegro 5.10
<p><a href="http://i.stack.imgur.com/PFLmW.png" rel="nofollow">Unhandled exception error thrown while running the program</a></p>

<p>Following is the source code of my program, there's no compilation error but when i run it i get the exception Runtime error as in the attached image.</p>

<blockquote>
  <p>Blockquote</p>
</blockquote>

<p>First-chance exception at 0x00000000 in all5.1.exe: 0xC0000005: Access violation executing location 0x00000000.
Unhandled exception at 0x778F1A91 in all5.1.exe: 0xC0000005: Access violation executing location 0x00000000.</p>

<blockquote>
  <p>Blockquote</p>
</blockquote>

<pre><code>#include &lt;conio.h&gt;
#include &lt;allegro5\allegro.h&gt;
#include &lt;allegro5\allegro_native_dialog.h&gt;
#include &lt;allegro5\allegro_font.h&gt;
#include &lt;allegro5\allegro_ttf.h&gt;
#include &lt;allegro5\allegro_image.h&gt;
#include &lt;allegro5\allegro_primitives.h&gt;

const int SCREEN_H = 690;
const int SCREEN_W = 1350;

class background
{
private: int advt_x = 1000, advt_y = SCREEN_H - 100, nw_m_x = 1350;       //data cannot be accessed from outside the class
public: ALLEGRO_FONT *size_20 = al_load_font("digital-7.ttf", 20, 2);     //loading font file for advt() and nw_title()
public: ALLEGRO_FONT *size_15 = al_load_font("digital-7.ttf", 15, 1);     //loading font file for nw_marquee()




public: void bground()
{
            ALLEGRO_BITMAP *bgr = al_load_bitmap("bground.jpg");    //loading the background vertex image
            if (bgr == NULL) //checking whether the image loaded successfully or not
            {
                al_show_native_message_box(NULL, "Error", NULL, "Fatal error: Backgroung Missing from disk!!!", NULL, NULL); //if image didn't loaded then print the error message
            }
            al_draw_bitmap(bgr, 0, 0, NULL);                        //printing the background image
}

public: void studio()
{
            ALLEGRO_BITMAP *anch = al_load_bitmap("anchor.jpg");
            if (anch == NULL) //checking whether the image loaded successfully or not
            {
                al_show_native_message_box(NULL, "Error", NULL, "Fatal error: Anchor Missing from disk!!!", NULL, NULL); //if image didn't loaded then print the error message
            }
            al_draw_bitmap(anch, SCREEN_W-300, SCREEN_H-500, NULL);                        //printing the anchor image
}
public: void news_info()
{
            ALLEGRO_BITMAP *nwinfo = al_load_bitmap("news_image.jpg");
            if (nwinfo == NULL) //checking whether the image loaded successfully or not
            {
                al_show_native_message_box(NULL, "Error", NULL, "Fatal error: News Media Missing from disk!!!", NULL, NULL); //if image didn't loaded then print the error message
            }
            al_draw_bitmap(nwinfo, 0, 200, NULL);                        //printing the News Media
}
public: void ch_logo()
{
            ALLEGRO_BITMAP *chlogo = al_load_bitmap("logo_header.jpg");
            if (chlogo == NULL) //checking whether the image loaded successfully or not
            {
                al_show_native_message_box(NULL, "Error", NULL, "Fatal error: News Media Missing from disk!!!", NULL, NULL); //if image didn't loaded then print the error message
            }
            al_draw_bitmap(chlogo, SCREEN_W-110, 0, NULL);                        //printing the News Media

}
public: void nw_title()
{
            al_draw_rectangle(0, 0, SCREEN_W-110, 72, al_map_rgb(0, 255, 0), 1.0);
            al_draw_text(size_20, al_map_rgb(128, 50, 30), 0, 0, 0, "Violence in a Restaurant over the payment of Bill amounting INR 260.");         //printing text
}
public: void nw_marquee()
{
            int nw_m_text_len = al_get_text_width(size_15, "All news headlines will be displayed in marquee here.");
            if (nw_m_x == (0 - nw_m_text_len))
            {
                nw_m_x = 1000;
            }
            al_draw_filled_rectangle(0, SCREEN_H-190, SCREEN_W, SCREEN_H-100, al_map_rgb(0, 255, 0));
            al_draw_text(size_15, al_map_rgb(128, 50, 30), nw_m_x, SCREEN_H - 140, 0, "All news headlines will be displayed in marquee here.");
            nw_m_x--;
}
public: void advt()
{
            al_draw_filled_rectangle(0, SCREEN_H-99, SCREEN_W, SCREEN_H, al_map_rgb(90, 110, 0));
            al_draw_text(size_20, al_map_rgb(128, 50, 30), advt_x, SCREEN_H-50, 0, "Ads will be shown here.");
            advt_x--;
}
   }bg;





int main()
{

ALLEGRO_DISPLAY *display = NULL;
if (!al_init())
{
    al_show_native_message_box(NULL, "Init error", NULL, "Allegro failed to initialise!!! Program is exiting.", NULL, NULL);
    return -1;
}
display = al_create_display(1350, 690);

al_set_window_position(display, 0, 0);
al_set_window_title(display, "New Window");

al_init_font_addon();       
al_init_image_addon(); 
al_init_primitives_addon(); 
bg.bground();
bg.studio();
bg.ch_logo();
bg.news_info();
while (1 == 1)
{
    bg.nw_title();
    bg.advt();
    bg.nw_marquee();
    al_flip_display();         //print from backBuffer to screen and makes things visible
    al_rest(3.0);
    al_destroy_display(display);
}

_getch();
return 0;
}
</code></pre>