我试图处理一个结构数组,但在访问成员时收到此错误:“必须有类/结构/联合”
struct person
{ int a; int b; int c;
}
person myArray[10];
int main()
{
for(var i = 0; i < 10; i++)
{
//Assume that connection string already established
outdata<< myArray[i].a << myArray[i].b << myArray[i].c << endl;//Error occurs here when accessing the members within my array of structs
}
return 0;
}
请指教。