Use gotoxy() function in c language in Codeblocks
COORD is a global variable and next is the function body for gotoxy().
#include <windows.h> /*Header file for gotoxy()*/
COORD coord={0,0};
void gotoxy(int x, int y)
{
coord.X = x;
coord.Y = y;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),coord);
}
No comments:
Post a Comment