c++的鼠標坑人代碼運行后彈出運行窗口鼠標同時開始無規則亂動導致無法正常使用。
#include <bits/stdc++.h> #include<windows.h> #include<winable.h> #include<ctime> using namespace std; int main(){ int x=1024,y=768; srand(time(0)); while(1){ BlockInput(true); SetCursorPos(rand()%x,rand()%y); } return 0; }
由於截圖截不到鼠標所以就不上圖片了。
具體關閉方法1.強制關機(簡單粗暴不推薦)2.在窗口還在的時候按Alt+F4(只有在窗口還在的時候才可使用)3.打開任務管理器按ctrl+shift+Esc鼠標自己會停記得關閉彈窗進程;
這個代碼謹慎使用請勿將X和Y換位(親測死機)
希望大家喜歡orz。