亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

這些語句代表什么,在哪個包里?

這些語句代表什么,在哪個包里?

搖曳的薔薇 2022-10-12 15:11:18
void gotoxy(int x, int y)//x為列坐標,y為行坐標{COORD pos = {x,y};HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);SetConsoleCursorPosition(hOut, pos);}
查看完整描述

2 回答

?
繁花如伊

TA貢獻2012條經驗 獲得超12個贊

控制臺:清屏, 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); /* 設置光標位置 */
}


查看完整回答
反對 回復 2022-10-16
?
BIG陽

TA貢獻1859條經驗 獲得超6個贊

int n1,n2,i,j,a[13],c,d; HANDLE consolehwnd; consolehwnd = GetStdHandle(STD_OUTPUT_HANDLE); SetConsoleTextAttribute(consolehwnd,5); cout ..

查看完整回答
反對 回復 2022-10-16
  • 2 回答
  • 0 關注
  • 117 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號