I couldn't find an anser on google...The following code is a tiny made-up example showing the problem I am looking at, at work.
I have a struct:
The warnings are:
warning: missing braces around initializer
warning: (near initialization for 'knobs.name')
warning: missing initializer
warning: (near initialization for 'knobs.keys')
Can someone look at this with me and explain what the missing braces are please?
I have a struct:
Code:
struct door_t { BOOL color; BOOL size; char name[4]; char keys[10]; } struct door_t knobs = { 0, //color 0, //size "", //name[0] "", //name[1] "", //name[2] "", //name[3] "" //keys[100] };
warning: missing braces around initializer
warning: (near initialization for 'knobs.name')
warning: missing initializer
warning: (near initialization for 'knobs.keys')
Can someone look at this with me and explain what the missing braces are please?
Comment