gotoxy function in Visual C++ and Non-Turbo C Compilers
Monday, October 31, 2011
Here is my function:
Gotoxy function is really essential in designing your programs. So use it well!
void gotoxy(int x, int y) //for gotoxy--> gotoxy(x,y)
{
HANDLE hConsoleOutput;
COORD dwCursorPosition;
cout.flush();
dwCursorPosition.X = x;
dwCursorPosition.Y = y;
hConsoleOutput = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleCursorPosition(hConsoleOutput,dwCursorPosition);
}
Sharing is so Easy: |
Labels:
C Programming,
C++
hahaha.. this is my favorite function in C programming :)
hola sir aj, :))). Dev-c++ compiler and visual-c++ have no gotoxy function, unless you use the codes above. hehehehe.
panu yan ?
Great Code