好东西就要拿出来分享
#include<windows.h>
#include<ctime>
using namespace std;
int main(){
int x=GetSystemMetrics(SM_CXSCREEN);//获取xy
int y=GetSystemMetrics(SM_CYSCREEN);
srand(time(0));
while(1){//无限循环(这个代码是可以被360杀掉的)
SetCursorPos(rand()%x,rand()%y);
}
return 0;
}