If I have a struct like this:
typedef struct
{
unsigned char c1;
unsigned char c2;
} myStruct;
What would be the easiest way to initialize this struct to 0?
Would the following suffice?
myStruct _m1 = {0};
or Would I need to explicitly init each member to 0?
myStruct _m2 = {0,0};
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…