Ver Mensaje Individual
  #1 (permalink)  
Antiguo 23/09/2010, 16:26
Alfonso1
 
Fecha de Ingreso: septiembre-2010
Mensajes: 137
Antigüedad: 13 años, 7 meses
Puntos: 0
pequeño codigo que me da error

Cita:
#include <allegro.h>

int main()
{
allegro_init();
install_keyboard();
install_mouse();
set_color_depth(16);
set_gfx_mode(GFX_AUTODETECT,640,480,0,0);
typedef struct BITMAP {int w, h;};
BITMAP* buffer;
buffer = create_bitmap(SCREEN_W,SCREEN_H);
double circle_pos_x = 0;
while(!key[KEY_ENTER]);
while(!key[KEY_ESC])
{
clear_bitmap(buffer);
circlefill(buffer,(int)circle_pos_x,SCREEN_H/2,50, makecol(255,255,255) );
circle_pos_x += 0.1;
if(circle_pos_x-50>= SCREEN_W) break;
blit(buffer, screen, 0,0,0,0,SCREEN_W,SCREEN_H);
}
return 0;
}
END_OF_MAIN();
el error dice lo siguiente:

C:\Dev-Cpp\asd\main.cpp In function `int _mangled_main()':
12 C:\Dev-Cpp\asd\main.cpp cannot convert `BITMAP*' to `_mangled_main()::BITMAP*' in assignment
17 C:\Dev-Cpp\asd\main.cpp cannot convert `_mangled_main()::BITMAP*' to `BITMAP*' for argument `1' to `void clear_bitmap(BITMAP*)'
18 C:\Dev-Cpp\asd\main.cpp cannot convert `_mangled_main()::BITMAP*' to `BITMAP*' for argument `1' to `void circlefill(BITMAP*, int, int, int, int)'
21 C:\Dev-Cpp\asd\main.cpp cannot convert `_mangled_main()::BITMAP*' to `BITMAP*' for argument `1' to `void blit(BITMAP*, BITMAP*, int, int, int, int, int, int)'
C:\Dev-Cpp\asd\Makefile.win [Build Error] [main.o] Error 1