Why don't the lines people[i].name = "something" work?
#include <stdio.h>
#include <stdbool.h>
#include <string.h>
typedef struct {
char name[100];
char number[100];
}
person;
int main(void)
{
person people[2];
people[0].name = "Brian";
people[0].number = "+1-617-495-1000";
people[1].name = "David";
people[1].number = "+1-949-468-2750";
}
My IDE says I should use strcpy but I'm very confused as to why.