invalid use of flexible array -flexible struct array as a member of another struct

前端 未结 2 1528
滥情空心
滥情空心 2021-02-06 00:29

I\'m beginning to learn about the use of structs in C. It\'s challenging and enjoyable. Needless to say I\'ve encountered a problem I can\'t seem to figure out. I\'m trying to m

2条回答
  •  -上瘾入骨i
    2021-02-06 01:23

    I am not an expert in this C feature but my common sense tells me that you cannot define objects of the type struct enginestruct, only pointers. This regards the engine variable in the following line:

    struct enginestruct engine,*engineptr;
    

提交回复
热议问题