C typedef of pointer to structure

后端 未结 6 882
暖寄归人
暖寄归人 2020-11-27 13:52

I had come across the following code:

typedef struct {
        double x;
        double y;
        double z;
} *vector;

Is this a v

6条回答
  •  隐瞒了意图╮
    2020-11-27 14:44

    yes...saves you the trouble of constantly typing the word 'struct' everytime you declare the vector struct or a pointer to it.

提交回复
热议问题