ERROR: R6010

I created a simple program in C++ and allegro with Visual C++ 2010 Express.

It works fine; I get no compiler errors. BUT, when I try to run the program I get a Message Box that says:
(Window Caption) "Microsoft Visual C++ Debug Library"
(error) "Debug Error!
Program: ...e\Desktop\programming\c++\visual\2010\BlockZ\Debug\BlockZ.exe

R6010
- abort() has been called

(Press Retry to debug the application)"

That's what it says!

HERE'S MY CODE:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <allegro.h>

int main()
{
	allegro_init();
	install_keyboard();
	set_color_depth(16);
	set_gfx_mode(GFX_AUTODETECT_WINDOWED, 640, 480, 0, 0);

	BITMAP* buffer = create_bitmap(640, 480);

	BITMAP* bg = load_bitmap("bg.bmp", NULL);

	while(!key[KEY_ESC])
	{
		blit(bg, buffer, 0, 0, 0, 0, 640, 480);
		blit(buffer, screen, 0, 0, 0, 0, 640, 480);
	}

	destroy_bitmap(buffer);
	destroy_bitmap(bg);

	return 0;
}
END_OF_MAIN();
Topic archived. No new replies allowed.