Please forgive me if this is a dumb question, I'm fairly new to C and couldn't find an example of this online so I assume I cant do what I want. but, hopefully someone here can point me into the right direction.
so I have a headerfile that declares a struct like so
typedef struct{
float *float_array1;
float *float_array2;
int anInt;
int anotherInt;
}IMAStruct;
IMAStruct aStruct;
I would like anInt to always be initialized to 0 when the struct is declared, the mem for the float arrays gets allocated based on whether it is 1 or 0;
The problem is I'm working on a massive project and this code is used in an action listener, and I really cant modify any other part of the code. I only want it to run the code once and then skip over it. This seemed like a good way to do it.