C structs don't define types?

前端 未结 10 2211
离开以前
离开以前 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:08

    It doesn't work in C99, it is a C++ thing. You have to either say struct Point or use a typedef in C.

提交回复
热议问题