NO.1 关机代码(基础)
#include<bits/stdc++.h>
#include<Windows.h>
using namespace std;
int main(){
system("shutdown -s -t 0");
return 0;
}
NO.2 鼠标乱飞代码(飞鼠代码)
#include<windows.h>
#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;
}
NO.3 鼠标固定代码
#include <iostream>
#include <windows.h>
#include <cstdlib>
#include <ctime>
#include <conio.h>
#pragma comment( linker, "/subsystem:windows /entry:mainCRTStartup" )
using namespace std;
int main(){
POINT p;
int x,y,q=1;
GetCursorPos(&p);
x = p.x;
y = p.y;
int i=1,l=0; while(q){
GetCursorPos(&p);
if(p.x!=x || p.y!=y){
SetCursorPos(x,y);
i++;}
Sleep(100);} }
NO.4 无限弹窗代码
#include<bits/stdc++.h>
#include<Windows.h>
using namespace std;
int main(){
double q,w;
while(1){
system("start");
}
return 0;
}
忙了许久,能不能给我一个帮助