elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Entrar al Canal Oficial Telegram de elhacker.net


  Mostrar Mensajes
Páginas: 1 2 3 [4]
31  Programación / Programación C/C++ / Re: aiudaaa!!! en: 5 Septiembre 2016, 00:21 am
Después de modificar el código funcionó.
32  Programación / Programación C/C++ / Re: aiudaaa!!! en: 4 Septiembre 2016, 11:40 am
Muchísimas gracias a todos, ya funciona!!
33  Programación / Programación C/C++ / Re: aiudaaa!!! en: 3 Septiembre 2016, 14:14 pm
me sigue saliendo lo mismo
34  Programación / Programación C/C++ / Re: aiudaaa!!! en: 2 Septiembre 2016, 16:25 pm
me sigue saliendo el mismo error...
35  Programación / Programación C/C++ / aiudaaa!!! en: 2 Septiembre 2016, 16:17 pm
Llevo toda la mañana tratando soluconar el siguiente error: id returned 1 ext status
                                                                      undefined reference to `WinMain@16' (utilizo dev c++)

Utilizo el compilador TMD-GCC 4.9.2 32-BIT RELEASE

este es el codigo que trato de compilar:
Código:
#include <stdio.h>
#include <stdlib.h>
#include <allegro.h>
#include <iostream>

int iniciar();
void realizar_juego();
void terminar();

int iniciar(){
allegro_init();
install_keyboard();
set_color_depth(16);
if (set_gfx_mode(GFX_AUTODETECT,640,480,0,0)<0){
printf("error al iniciar el modo grafico\n");
allegro_exit();
exit(-1);
}
}

void terminar(){
allegro_exit();
}
int main(){
iniciar();
realizar_juego();
terminar();
}
void realizar_juego(){

BITMAP *nave;
PALETTE paleta;
int x,y, x_anterior, y_anterior;
BITMAP * buffer;


nave=load_bitmap("C:/Users/DANIEL/Desktop/Programación/C++/Allegro/Naves/recursos/nave.pcx", paleta);
set_palette(paleta);
if (nave==NULL) terminar();
buffer=create_bitmap(nave->w,nave->h);
clear (buffer);
if (buffer==NULL) terminar();
x=SCREEN_W/2;
y=SCREEN_H/2;

while (!key[KEY_ESC]){

if (key[KEY_UP,KEY_W])
y--;
if (key[KEY_DOWN,KEY_S])
y++;
if (key[KEY_LEFT,KEY_A])
x--;
if (key[KEY_RIGHT,KEY_D])
x++;

if (x<0) x=x_anterior;
if (x>SCREEN_W-nave->w) x=x_anterior;
if (y<0) y=y_anterior;
if (y>SCREEN_H-nave->h) y=y_anterior;
if ((x_anterior!=x) || (y_anterior!=y)){
blit (buffer,screen, 0, 0, x_anterior, y_anterior,buffer->w,buffer->h);
blit (screen,buffer,x,y,0,0,buffer->w,buffer->h);
draw_sprite(screen,nave, x, y);
}
x_anterior=x;
y_anterior=y;


}
}
gracias!!
36  Programación / Programación C/C++ / Re: c++ en: 2 Septiembre 2016, 16:11 pm
perdon soy nuevo :P
37  Programación / Programación C/C++ / c++ en: 2 Septiembre 2016, 15:41 pm
el caso es que cuando intento compilar en c++ me dice: error id returned 1 exit status, llevo toda la mañana buscando en internet y no encuentro nada que me sirva, ayuda por favor!!
Páginas: 1 2 3 [4]
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines