#include<stdio.
h>
#include<windows.h>
void gotoxy(int x, int y)
{
HANDLE hcon;//cualquier nombre para la ventana
hCon = GetStdHandle(STD_OUTPUT_HANDLE);
COORD dwPos;
dwPos.X = x;
dwPos.Y =y;
SetConsoleCursorPosition(hCon,dwPos);
}
int main()
{
int x=10, y=10;
gotoxy(x,y); printf("*");
bool gameOver = false;
while(!game_over)
{
if(kbhit())
{
char tecla=getch();
gotoxy(x,y); printf(" ");
if(tecla == 'j') x--;
if(tecla == 'l') x++;
if(tecla == 'i') y--;
if(tecla == 'k') y++;
}
}
return 0;
}
descargar y descomprimir
copiar los archivos en las siguientes direcciones:
glut.h ->mingw\include\GL
[Link] ->mingw\lib
[Link] ->windows\system32