C structs don't define types?

前端 未结 10 2204
离开以前
离开以前 2021-01-21 06:54

I\'ve just started learning C with a professional Java background and some (if no too much) C++ knowledge, and I was astonished that this doesn\'t work in C:

str         


        
10条回答
  •  生来不讨喜
    2021-01-21 07:20

    struct Point is the type just like union Foo would be a type. You can use typedef to alias it to another name - typedef struct Point Point;.

提交回复
热议问题