|
发表于 2023-1-7 12:37:12
|
显示全部楼层
本帖最后由 zsy0226 于 2023-1-7 12:42 编辑
- #inc1ude<iostream>//l打成了1
- //少了:windows.h
- using namespace
- std;//std不用换行
-
- int main()
- {
- int num;
- cout<<"欢迎来到聊天软件轰炸机"<<endl;
- cout<<"请输入发送次数:";
- cin>>num;
- cout<<"请把发送内容复制到剪切板,然后按下任意键继续接着在0.5秒内把鼠标移到聊天窗口"<<endl;
- system("pause");
- Sleep(500);
- for(int i=1;i<=num;i++)
- {
- keybd_event(VK_CONROL, (BYTE) 0, 0, 0);//CONTROL打错了
- keybd_event('V', (BYTE)0, 0, 0);
- keybd_event(VK_CONTROL, (BYTE)0, KEYEVENTF_KEYUP, 0);
- //少了keybd_event('V', (BYTE)0, KEYEVENTF_KEYUP, 0);
- keybd_event(VK_RETURN, (BYTE)0, 0, 0);
- Sleep(100);
- }
- return O;//O错了,是0
- }
复制代码
所以有6处
正确:- #include<iostream>
- #include<windows.h>
- using namespace std;
-
- int main()
- {
- int num;
- cout<<"欢迎来到聊天软件轰炸机"<<endl;
- cout<<"请输入发送次数:";
- cin>>num;
- cout<<"请把发送内容复制到剪切板,然后按下任意键继续接着在0.5秒内把鼠标移到聊天窗口"<<endl;
- system("pause");
- Sleep(500);
- for(int i=1;i<=num;i++)
- {
- keybd_event(VK_CONTROL, (BYTE) 0, 0, 0);
- keybd_event('V', (BYTE)0, 0, 0);
- keybd_event(VK_CONTROL, (BYTE)0, KEYEVENTF_KEYUP, 0);
- keybd_event('V', (BYTE)0, KEYEVENTF_KEYUP, 0);
- keybd_event(VK_RETURN, (BYTE)0, 0, 0);
- Sleep(100);
- }
- return 0;
- }
复制代码 |
|