I want to create a struct member haircolour with the struct variable of brown but when I try to compile I get the error "character constatnt too long for its type" and "assignment to expression with array type" I would appreciate any help on how to sort this out.
Ive tried a lot of other option such as putting double quotes around brown but this does not work
struct person {
int age;
int weight;
int height;
char haircolour[50];
};
struct person john;
john.age = 27;
john.weight = 80;
john.height = 170;
john.haircolour = 'brown';
printf("Here are the personal details of john: \n\n");
printf("age: %d \n",john.age);
printf("weight: %dkg \n",john.weight);
printf("height: %dcm \n",john.height);
printf("hair colour: %s", john.haircolour);