#include<stdio.h>
#include<conio.h>
#include<windows.h>
void gotoxy(short x, short y); //here we declare the gotoxy function//
main()
int x=1,y=1;
{
gotoxy(x,y); //now where we want to call gotoxy function //
printf("*");
}
return 0;
}
void gotoxy(short x, short y) //definition of gotoxy function//
{
COORD pos ={x,y};
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), pos);
this is what I have so far. but I'd like to make it so when I use the arrow keys, it would reposition itself by moving one space towards whichever the direction the key pressed is pointing