这些语句代表什么,在哪个包里?

void gotoxy(int x, int y)//x为列坐标,y为行坐标
{
COORD pos = {x,y};
HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleCursorPosition(hOut, pos);
}

摇曳的蔷薇
浏览 130回答 2
2回答

繁花如伊

控制台:清屏, gotoxy#include <windows.h>#include <stdio.h>#include <string.h>void Cls(HANDLE hConsole);void gotoxy(HANDLE hOut, int x, iny y);int main(){DWORD state = 0, res;HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);Cls(hOut);gotoxy(hOut, 5, 5);printf("position: 5, 5\n");CloseHandle(hOut);}void Cls(HANDLE hConsole){COORD coordScreen = ;BOOL bSuccess;DWORD cCharsWritten;CONSOLE_SCREEN_BUFFER_INFO csbi;DWORD dwConSize;bSuccess = GetConsoleScreenBufferInfo(hConsole, &csbi);dwConSize = csbi.dwSize.X * csbi.dwSize.Y;bSuccess = FillConsoleOutputCharacter(hConsole, (TCHAR) ' ', dwConSize, coordScreen, &cCharsWritten);bSuccess = GetConsoleScreenBufferInfo(hConsole, &csbi);bSuccess = FillConsoleOutputAttribute(hConsole, csbi.wAttributes, dwConSize, coordScreen, &cCharsWritten);bSuccess = SetConsoleCursorPosition(hConsole, coordScreen);}void gotoxy(HANDLE hOut, int x, iny y){COORD pos;pos.X = x;pos.Y = y;SetConsoleCursorPosition(hOut, pos); /* 设置光标位置 */}

BIG阳

int n1,n2,i,j,a[13],c,d; HANDLE consolehwnd; consolehwnd = GetStdHandle(STD_OUTPUT_HANDLE); SetConsoleTextAttribute(consolehwnd,5); cout ..
打开App,查看更多内容
随时随地看视频慕课网APP