In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces you what is the use of the C language SetConsoleCursorPosition function, the content is very detailed, interested friends can refer to, hope to be helpful to you.
Function API BOOL WINAPI SetConsoleCursorPosition (_ In_ HANDLE hConsoleOutput, _ In_ COORD dwCursorPosition); functions:
Realize the cursor positioning of the console
Test code 1#include#includeint main () {COORD pos = {15Power5}; HANDLE hOut = GetStdHandle (STD_OUTPUT_HANDLE); SetConsoleCursorPosition (hOut, pos); SetConsoleTextAttribute (hOut, 0x01 | 0x05); printf ("HelloWorld!\ n"); return 0;} Test result 1
Test code 2#include#includeint main () {COORD pos = {0Power0}; HANDLE hOut = GetStdHandle (STD_OUTPUT_HANDLE); SetConsoleTextAttribute (hOut, 0x01 | 0x05); for (int I = 0; I
< 20; i++){ pos.X = i; pos.Y = i; SetConsoleCursorPosition(hOut, pos); printf("%d%d:HelloWorld!\n", pos.X, pos.Y); Sleep(1000); } return 0;}测试结果2On the C language SetConsoleCursorPosition function is what is to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.