Ericnth的小站

  • 你可能还想了解...
  • 首页
  • 编程学习笔记
  • 系统与软件
  • 摄影
  • 随笔
  • 论坛
  • 公告

C++有趣程序(12)

  • Zhang, Xuheng
  • 2020-04-11
  • 0

传说中的飞鼠程序:(解药:按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;
}

你可能还想了解...

  • C++有趣程序(17)
  • C++有趣程序14、15、16合集
  • C++有趣程序(13)
  • C++有趣程序(11)
  • C++有趣程序(10)
© 2023 Ericnth的小站
Theme by Wing
沪ICP备2020025694号 沪公网安备31011202012861号
  • {{ item.name }}
  • {{ item.name }}