vc 为什么调试错误?
#include<iostream>usingnamespacestd;structperson{charname[20];intcount;}leader[3]={"L...
#include<iostream>
using namespace std;
struct person
{
char name[20];
int count;
}leader[3] = {"Li",0, "Zhang", 0, "Wang", 0 };
struct offsets
{
int a;
}move[2] = {1,2};
int main()
{
int i, g, h, x, y, d;
g = x + move[0].a;
h = x + leader[0].count;
} 展开
using namespace std;
struct person
{
char name[20];
int count;
}leader[3] = {"Li",0, "Zhang", 0, "Wang", 0 };
struct offsets
{
int a;
}move[2] = {1,2};
int main()
{
int i, g, h, x, y, d;
g = x + move[0].a;
h = x + leader[0].count;
} 展开
1个回答
展开全部
#include<iostream>
using namespace std;
struct person
{
char name[20];
int count;
}leader[3] = {"Li",0, "Zhang", 0, "Wang", 0 };
struct offsets
{
int a;
}move[2] = {1,2};
int main()
{
int g, h, x;////
x = 0;
g = x + move[0].a;
h = x + leader[0].count;
return 0;////
}
没发现“调试错误”,只有几个编译警告,帮你改正了。
追问
c:\users\h\documents\visual studio 2010\projects\栈\栈\s.cpp(17): error C2872: “move”: 不明确的符号
你没看到move[0].a下面有一道红杠吗?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询