Skip to content

Instantly share code, notes, and snippets.

@AlexR1712
Created October 28, 2016 04:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AlexR1712/b0a5ad9fd383f44db6820c5841eba2e3 to your computer and use it in GitHub Desktop.
Save AlexR1712/b0a5ad9fd383f44db6820c5841eba2e3 to your computer and use it in GitHub Desktop.
Gotoxy in native C
#include<stdio.h>
//gotoxy function
void gotoxy(int x,int y)
{
printf("%c[%d;%df",0x1B,y,x);
}
main ()
{
gotoxy(25,50); //reposition cursor
printf("hello world"); //display text
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment