So here is what i have done
I did the basics of c++ and was quite comfortable with them
Now i wanted to start with the allegro gaming library
so i downloaded the library and linked it with my compiler
i compile a program and it compiles fine but when it runs it just displays and blank screen saying windows application at top
What do i do?
Please Help
Here is my code:-

#include <allegro.h>

int x = 10;
int y = 10;

int main(){
    set_gfx_mode( GFX_AUTODETECT, 640, 480, 0, 0);
    while ( !key[KEY_ESC] ){
        textout_ex( screen, font, " ", x, y, makecol( 0, 0, 0), makecol( 0, 0, 0) );
        if (key[KEY_UP]) --y;        
        else if (key[KEY_DOWN]) ++y;    
        else if (key[KEY_RIGHT]) ++x;
        else if (key[KEY_LEFT]) --x;

        textout_ex( screen, font, "@", x, y, makecol( 255, 0, 0), makecol( 0, 0, 0) );

    return 0;

Recommended Answers

All 2 Replies

You would probably like to post it in the Game Development section or the moderator could just move it there

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.