跳到正文

个人记录

写东西要的东西

Zzy985约 2 分钟
原文
文章信息与版本

文章信息

发布
2026年3月24日
收录
2026年7月24日
更新
2026年11月13日
篇幅
约 2 分钟
获赞
1

版本

  1. v1当前

好东西

C++
#include<bits/stdc++.h>
#include <windows.h>  
#include <conio.h>   
using namespace std;

int main() {
//    HANDLE hInput = GetStdHandle(STD_INPUT_HANDLE);
//    DWORD mode = ENABLE_MOUSE_INPUT | ENABLE_EXTENDED_FLAGS;
//    SetConsoleMode(hInput, mode);
//    INPUT_RECORD event;
//    DWORD read;
//	srand(static_cast<unsigned>(time(0))); // 设置随机种子
//	rand();
//	Sleep(1000);
//	system("cls");
//	_getch();//读按键(不显示在屏幕上)
//	_kbhit();//判断有没有按键
//	event.MouseEvent.dwMousePosition.X//鼠标坐标
//	ReadConsoleInput(hInput, &event, 1, &read);// 读取鼠标/键盘事件
//	event.MouseEvent.dwButtonState==FROM_LEFT_1ST_BUTTON_PRESSED//左键点击
//	void HideCursor() {
//	    CONSOLE_CURSOR_INFO curInfo;
//	    GetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE), &curInfo);
//	    curInfo.bVisible = FALSE;
//	    SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE), &curInfo);
//	}//去闪烁 
//	void gotoxy(int x, int y) {
//	    COORD pos = {(SHORT)x, (SHORT)y};
//	    SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), pos);
//	}//代替 system("cls");可不闪烁 
//    HideCursor();
//gotoxy(0, 0);
    return 0;
}
原文