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

后端 未结 10 935
梦谈多话
梦谈多话 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

    Because Bjarne had the benefit of hindsight: he realized that the C declarator syntax was "an experiment that failed" (read: the C declarator syntax is retarded). The rest has already been answered by others.

提交回复
热议问题