求助_scanf输入
程序代码:
#define _CRT_SECURE_NO_WARNINGS 1 #pragma warning(disable:6031) #include <stdio.h> #include <stdlib.h> #include <time.h> #include <windows.h> int main(void) { //复制内容... HWND qqhd; char ch[1024]={0}; printf("输入并打开QQ窗口(名):"); scanf("%s",&ch[1024]); qqhd=FindWindow(NULL,ch); int i = 10; while (i != 0) { SendMessageA(qqhd, WM_PASTE,0 ,0 ); SendMessageA(qqhd, WM_KEYDOWN, VK_RETURN, 0); i-=1; Sleep(50); } return 0; }
用的vs2022,一运行就报错