As already suggested you should show the declaration of the tpyes.
However, from the error message something like this can be assumed:
std::string HorseNames[MAX_HORSES];
struct {
char name;
} Horses;
Horses horses[MAX_HORSES];
Then
HorseNames[i]
is a
std::string
which can not be assigned to a single
char
like
horses[i].name
.
You probably want
Horses.name
to be a
std::string
too or a
char
array. In the latter case you could not use an assignment but have to copy the string:
char name[MAX_NAME_LEN];
strncpy(name, HorseNames[i], sizeof(name) / sizeof(name[0]));
name[sizeof(name) / sizeof(name[0]) - 1] = '\0';