What is the proper syntax for initializing a pointer to an array of structures?
I have the following definitions:
If I try to initialize the pointer ptrTL it works fine
TargetList_t* ptrfoo = &foo;
TargetList_t* ptrTL = &TL;
However, in initializing the pointer to foo
ptrTL->targets.distX = 4;
I get an error saying:
ptrfoo->targets.distX = 2;
what gives? How can I initialize a pointer to an array of structures?
error C2232: '->targets' : left operand has 'struct' type, use '.'