I have this struct definition:
typedef struct intArray
{
int myArray[1000];
} intArray;
My goal is to create an intArray of zeros, i tried this:
intArray example;
int createArray[1000] = {0};
example.myArray = createArray;
This results in this error message:
error: assignment to expression with array type
I want the struct to automatically initialize the array to 0's but i understand it is not possible because it is only a type definition and not a variable. So i created one and created the array, just tried to assign it and this is the result. Any advice is appreciated.