2008年4月14日 星期一

gotoxy function in Dev-C++

要 include windows.h 這個 file

void gotoxy(int x, int y)
{
COORD pos;
pos.X = x - 1;
pos.Y = y - 1;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),pos);
}

沒有留言: