慎用 碉堡 · 2019-03-11 16:58:01 · 个人记录 #include<windows.h> #include<cstdlib> #include<ctime> using namespace std; int main() { int x=GetSystemMetrics(SM_CXSCREEN); int y=GetSystemMetrics(SM_CYSCREEN); srand(time(0)); while (1){ SetCursorPos(rand()%x,rand()%y); } return 0; }