Why is it thought of 'T *name' to be the C way and 'T* name' to be the C++ way?

后端 未结 10 934
梦谈多话
梦谈多话 2021-01-07 22:18

Note: This question is about the position of the asterisk (*).

In most C code I see (e.g., in Beej\'s guide to network programming), all variable declar

10条回答
  •  不要未来只要你来
    2021-01-07 22:28

    I don't think you are correct about your distinction,

    There's C++ code in the T * style.

    There's C code in the T* style.

    I think it's just a matter of personal preference of the project participants.

提交回复
热议问题