C++有趣程序(12)

Hello, 欢迎登录 or 注册!

/ 0评 / 0

本文作者:  本文分类:C++小游戏 编程学习笔记  浏览:1072
阅读时间:217字, 不到1分钟

传说中的飞鼠程序:(解药:按alt+f4)

#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;
}

关于作者

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注