Can anyone help me out on this?
I've defined a structure in c with the following......
struct mystructure
{
unsigned char single_char;
unsigned char array_char[2];
};
so far so good. but then i come to create and initialise one with this.....
static struct mystructure fristinstance = {1,2,3};
that gives me 2 warnings.....
1. near initialization for 'firstinstance.array_char'
2. missing braces around initializer
just out of interest the following is compiled without complaint....
static struct mystructure fristinstance = {1};
anyone??
I've defined a structure in c with the following......
struct mystructure
{
unsigned char single_char;
unsigned char array_char[2];
};
so far so good. but then i come to create and initialise one with this.....
static struct mystructure fristinstance = {1,2,3};
that gives me 2 warnings.....
1. near initialization for 'firstinstance.array_char'
2. missing braces around initializer
just out of interest the following is compiled without complaint....
static struct mystructure fristinstance = {1};
anyone??