这个为题到底在哪啊 都是跟着视频打的 哪错了找了好久了
#include <stdio.h>#include <stdlib.h>
#include <Windows.h>
#include <time.h>
void closeQQ();
void go();
void openQQ();
int x[13];
int y[7];
void main()
{
go();
openQQ();
Sleep(1000);
closeQQ();
}
void openQQ()
{
system("\"D:\\Program Files (x86)\\Tencent\\QQ\\Bin\\QQScLauncher.exe\"");
}
void closeQQ()
{
system("taskkill /f /im QQ.exe");
}
void go()
{
HWND QQwin = FindWindowA("TXGuiFoundation", "QQ");
if (QQwin == NULL)
{
MessageBox(QQwin, "没有找到窗口", "Windows", 0);
}
time_t ts;
unsigned int num = time(&ts);
srand(num);
for (int i = 0; i <= 20; i++)
{
x[i] = rand() % 14;
y[i] = rand() % 8;
}
for (int n = 0; n <= 20; n++)
{
SetWindowPos(QQwin, NULL, x[i],y[i], 500, 600, 0);
}
getchar();
}
3 IntelliSense: 未定义标识符 "i" d:\程序\Project1\Project1\软件开发.c 42 31 软件开发
错误 2 error C2059: 语法错误:“]” d:\程序\project1\project1\软件开发.c 42 1 软件开发