hi,
i'm trying create struct array this.
typedef struct namelist
{
char name;
int deviceid;
}; namelist namelist[5];
and fill in data this.
namelist[0].name = "firstname";
namelist[0].deviceid = 0x01;
but i'm getting kind of error
error: invalid conversion 'const char*' 'char' [-fpermissive]
what i'm doing wrong here?
thanks
i'm trying create struct array this.
typedef struct namelist
{
char name;
int deviceid;
}; namelist namelist[5];
and fill in data this.
namelist[0].name = "firstname";
namelist[0].deviceid = 0x01;
but i'm getting kind of error
error: invalid conversion 'const char*' 'char' [-fpermissive]
what i'm doing wrong here?
thanks
char single character, not whole string
Arduino Forum > Using Arduino > Programming Questions > struct array
arduino
Comments
Post a Comment