Hello,
I'm trying to reference the elements of an array that is based on a typedef but not sure how to do it. VC is treating the index as the entire size of the array. For example:
How to I reference the elements in the array????Code:typedef struct Struct1 { int var1; int var2; } Struct1Type; typedef Struct1Type ArrayOfStruct1Type[8]; typedef struct Struct2 { int var3; ArrayOfStruct1Type var4; } Struct2Type; Struct2Type vars2; ArrayOfStruct1Type *arr=&vars2.var4; for (int i=0;i<8;i++) { int xy=arr[i]->var1; // <<<<< doesn't work }