Hi this is my very first post on c++.com........ i have been trying to make a box moving game ,,,where the goal is to make it reach a specific pt ...but the prob is cleardevice();
as it removes evrything .... even the goal pt
#include<iostream.h>
#include<conio.h>
#include<dos.h>
#include<graphics.h>
void main()
{
clrscr();
int driver = DETECT,mode;
int i,x=75,y=75,x1=125,y1=125;
initgraph (&driver,&mode,"C:\\TC\\BGI");
rectangle(75,75,125,125);
int ch='f',c=10,cof=0,cod=0,col=0,cor=0;
cout<<"press WASD or q to quit";
ch=getch();
cout<<ch;
while((ch!='q')||(ch!='Q'))
{ch=getch();
if((ch=='s')||(ch=='S'))
{
cod=cod+1;
cof=0;
y=y+cod*5;
y1=y1+cod*5;