C++有趣程序(12)

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

0 0 vote
Article Rating
Subscribe
提醒
0 评论
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x