Ok, I have been reading a c++ book lately, and I have definitely got the hang of it. But the only problem I am having is with making a program more than one file. So can somebody help me?
main.cpp
#include <allegro.h>
#include "header.h"
int main( int argc, char *argv[] )
{
allegro_init();
install_keyboard();
set_window_title( "SPACEWAR" );
set_color_depth( 24 );
set_gfx_mode( GFX_AUTODETECT, 680, 420, 0, 0 );
if( ! ( KEY_ESC ) )
{
draw_sprite( ship1, 0, 0 );
}
readkey();
return 0;
}
END_OF_MAIN()
header.h
BITMAP *ship1 = NULL
ship1 = load_bitmap( "ship1.png", NULL );