Make a cursor move in c++ using generic functions

Hi guys im really confused and don't know how to do all this. i made a cursor using (windows.h)
1. fd or forward [e.g. forward 60] moves forward
2. bk or backward [e.g. backward 60] moves backwards
3. rt [rt 90] right turn only angles multiple of 45
4. lt [lt 90] left turn only angles multiple of 45
5. repeat [e.g. repeat 4[fd 50 rt 90] repeat what ever in [] n number of times. In this case n is 4.
6. pu [Moves the point of cursor upwards]
7. pd [Moves the point downwards]
8. color [e.g. color BLACK] change color of pen
9. width [e.g. WIDTH 5] change width (pixel size) of pen
10. cs [clear screen]
i have posted the code i have done so far but there are several flaws in it can anyone show me how to do it
//i have made "myLine" function which makes a line
void Cursor(int x1, int y1, int x2, int y2, int color)
{
while(x1<x2)
{
myLine(x1,y1,x2,y2,255,255,255);
x1=x1++;
y1=y1--;
x2=x2--;
y2=y2--;

}
}
void Forward(int x1, int y1, int x2, int y2, int color)
{
int n;
cin>>n;
while(x1<x2)
{
myLine(x1, y1-n, x2, y2-n, 255,255,255);
x1=x1++;
y1=y1--;
x2=x2--;
y2=y2--;
}

}
int main()
{
char command;
gotoxy(1,50);
myLine(1,275,1000,275,255,255,255);
Cursor(260,245,290,245,255);
while(1)
{
cout<<"Enter command:";
cin>>command;
if(command=='f')
{

cout<<"Forward: ";
Forward(260, 245, 290, 245, 255);
}
}

}
Topic archived. No new replies allowed.