   allegro help please
  i keep getting these errorsmain.cpp:7: error: expected constructor, destructor, or type conversion before '(' tokenmain.cpp:7: error: expected `,' or `;' before '(' tokenwhen tring to compile VVVV#include <allegro.h>void menu(void);//resourcesBITMAP *buffer = create_bitmap(640, 480);draw_sprite(screen,buffer,0,0);int main(void){  allegro_init();  install_keyboard();  set_color_depth(24);  set_gfx_mode(GFX_AUTODETECT, 640, 480, 0, 0);  while ( !key[KEY_ESC] )  {  menu(); //display main game menu  }  return 0;}END_OF_MAIN()void menu(void){   textout_ex(buffer, font, "Start Game", (640/2)-45, 480/2, (0,0,200), NULL);   textout_ex(buffer, font, "Exit", (640/2)-25, (480/2)+25, (0,0,200),NULL);   int menu_place = 0;   if ( key[KEY_DOWN] )   {  menu_place = 1;   }   if ( menu_place == 0 )   {  textout_ex(buffer, font, "Start Game", (640/2)-45, 480/2, (0,0,255), NULL);   }   if ( menu_place == 1 )   {  textout_ex(buffer, font, "Exit", (640/2)-25, (480/2)+25, (0,0,200),NULL);   }}i don't know what the problem is   
  I'd say it's because you can't draw things out of functions like that(draw_sprite at line 7). The sprite drawing should happen at some point in your main loop and after initializing Allegro.   ;  Yeah, no function calls like that in the global space; that's just flat out illegal coding. :)I should also warn you not to initialize that bitmap before set_gfx_mode() is called anyway; otherwise it doesn't get created right. Go ahead and declare buffer where it is, but move those two function calls to main().   