I was looking for a substitute of gotoxy
for Dev C++ v5.11 (gcc compiler) and found this:
void gotoxy(int x,int y) {
printf("%c[%d;%df", 0x1b, y, x);
}
After this when I tried to call this function as follows:
int main() {
gotoxy(20, 10);
printf("Hello");
return 0;
}
Output was not as expected:
<-[10;20fHello
This was printed in top left most corner of screen (i.e. 1,1) instead of (20,10).
Please give me suggestions that what I can do to use gotoxy
in my code.