I want to have two structs that can contain each other. Here is an example:
struct a {
struct b bb;
};
struct b {
struct a aa;
};
But this code doesn't compile. gcc says:
test.c:3: error: field ‘bb’ has incomplete type
Is there a way to achieve this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…