Caute...mam problem...tento kod:
#include <iostream>
#include <allegro5\allegro.h>
#include <allegro5\allegro_font.h>
#include <allegro5\allegro_ttf.h>
#include <allegro5\allegro_native_dialog.h>
using namespace std;
int main(int argc, char **argv)
{
bool alINIT=false,keyboard;
cout<<"DEBUG:"<<endl;
alINIT=al_init();
if (alINIT==true) {cout<<"Allegro inicializovano."<<endl;}else{cout<<"ERROR: Allegro se neinicializovalo."<<endl;}
ALLEGRO_DISPLAY *display;
display = al_create_display(640, 480);
if (display==NULL) {cout<<"ERROR: Display se nepodarilo nastavit."<<endl;}else {cout<<"Display nastaven."<<endl;}
al_init_font_addon();
al_init_ttf_addon();
ALLEGRO_FONT *fooont = al_load_font("arial.ttf",10,0);
al_clear_to_color(al_map_rgb(0,0,0));
al_draw_text(fooont,al_map_rgb(255,0,255),1,1,0,"Ahoj!");
al_flip_display();
al_rest(3.0);
al_destroy_display(display);
return 0;
}
Kdyz ho zkompiluji ve visual studiu 2010...tak to zkompiluje, spusti a potom ukaze tuhle chybu:
Unhandled exception at 0x57aab1b1 in dd.exe: 0xC0000005: Access violation reading location 0x00000008.
Ale kdyz si ten zkompilovany exe soubor najdu...a spustim...tak to vse funugje....
A kdyz ten kod hodin do Dev-Cpp...tak mi to funguje taky spravne....Takze nevim v cem je chyba...
Opravdu bych potreboval pomoct...Diky