I am trying to initialize a string in C on this code :
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#pragma warning(disable:4996)
struct person{
char name[10];
int id;
}; typedef person_t;
struct family{
person_t father;
person_t mother;
person_t kid[10];
}; typedef family_t;
void main()
{
family_t fam;
fam.father.name = "sdsd";
}
This code gives me C-2224 Eror. How do i access eache struct of type person_t that are inside the struct of type family_t?