Skip to content

Instantly share code, notes, and snippets.

@boodahDEV
Last active September 25, 2020 03:13
Show Gist options
  • Save boodahDEV/1a60053673335505fd4bf7cd01be3b6b to your computer and use it in GitHub Desktop.
Save boodahDEV/1a60053673335505fd4bf7cd01be3b6b to your computer and use it in GitHub Desktop.
Esta función mueve el cursor de la ventana de texto a la posición según las coordenadas especificadas por los argumentos x e y. Si las coordenadas no son válidas entonces la llamada a la función gotoxy es ignorada. Los argumentos no pueden ser 0.
void gotoxy(int x,int y){
HANDLE hcon;
hcon = GetStdHandle(STD_OUTPUT_HANDLE);
COORD dwPos; dwPos.X = x; dwPos.Y= y;
SetConsoleCursorPosition(hcon,dwPos);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment