Olá colegas!
Estou utilizando o Turbo C++ 3.0 e o programa apresenta os erros abaixo no momento de rodar, mas ele compila.
_detectgraph in module
_initgraph in module
_closegraph in module
Saberiam me dizer o motivo?
Segue o programa.
Programa que permite mover um círculo pela tela utilizando as setas do teclado.
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
#define LEFT 75
#define RIGHT 77
#define UP 72
#define DOWN 80
#define ESC 27
#define PASSO 5
#define RAIO 50
void opengraph(void);
main(){
int key, x, y;
key = 0;
x = 100;
y = 100;
opengraph();
do{
circle(x, y, RAIO);
key = getche();
cleardevice();
if(key == LEFT) x = x - PASSO;
if(key == RIGHT) x = x + PASSO;
if(key == UP) y = y - PASSO;
if(key == DOWN) y = y + PASSO;
}while(key != ESC);
closegraph();
return(0);
}
void opengraph(void){
int driver, mode;
detectgraph(&driver, &mode);
initgraph(&driver, &mode, "");
}