For example, say I wanted to make a genetics simulator and I had this very simple struct
public struct person{
string name;
int age;
string hairColor;
person father;
person mother;
}
so that later I could reference the person Joey's parent's hair color with Joey.father.haircolor? I keep getting error:
Struct Member 'person.father' of type 'person' causes a cycle in the struct layout
Is my only option to use a class? For the sake of speed I'd prefer to use a struct since it's all data, but if there's no alternative I can obviously just use a class.