Try removing the 'typedef' altogether. You are 'forward' defining 'B' as plain struct (telling the compiler), and then you are using typedef keyword to define B (based on _B).