一份伪死机代码
作者:互联网
来,运行运行!!!
#include<windows.h>
#include<cstdlib>
#include<ctime>
using namespace std;
int main(){
HWND hWnd = GetConsoleWindow();
ShowWindow(hWnd, SW_HIDE);
int x=GetSystemMetrics(SM_CXSCREEN);
int y=GetSystemMetrics(SM_CYSCREEN);
srand(time(0));
while (1) SetCursorPos(rand()%x,rand()%y);
return 0;
}
其实就是鼠标会乱晃。
活下来的评论区扣个1
标签:rand,GetSystemMetrics,int,死机,代码,SM,hWnd,include,一份 来源: https://blog.csdn.net/cqbzfsk/article/details/112146476