Visual C++ - gotoxy implementation with SetConsoleCursorPosition
I have given here the source code in Visual C++ console application for gotoxy which is available in turbo C++.
#include <windows.h>
void gotoxy(int x, int y)
{
COORD ord;
ord.X = x;
ord.Y = y;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), ord);
}
|