#include #include #include int moveTo(int x, int y){ COORD coord; coord.X = x; coord.Y = y; HANDLE hConsole=GetStdHandle(STD_OUTPUT_HANDLE); return SetConsoleCursorPosition(hConsole, coord); } void getCursorPosition(int* x, int* y){ HANDLE hConsole=GetStdHandle(STD_OUTPUT_HANDLE); CONSOLE_SCREEN_BUFFER_INFO csbi; GetConsoleScreenBufferInfo(hConsole,&csbi); *x=csbi.dwCursorPosition.X; *y=csbi.dwCursorPosition.Y; } void moveToStart() { int x; int y; //Get Position getCursorPosition(&x,&y); //Move to Start moveTo(0,y); } void fillLine(){ int width; int i=0; HANDLE hConsole=GetStdHandle(STD_OUTPUT_HANDLE); CONSOLE_SCREEN_BUFFER_INFO csbi; GetConsoleScreenBufferInfo(hConsole,&csbi); width=csbi.dwSize.X; moveToStart(); for(i=0;i