I need to instate a struct element, split in presentation and introduction. This is the thing that I have:
typedef struct MY_TYPE {
bool flag;
short int value;
double stuff;
} MY_TYPE;
void function(void) {
MY_TYPE a;
...
a = { true, 15, 0.123 }
}
Is this the best approach to announce and instate a local variable of MY_TYPE as per C programming language norms (C89, C90, C99, C11, and so forth)? Or then again is there anything better or possibly working?