In C, what is the correct syntax for declaring pointers?

后端 未结 8 1269
终归单人心
终归单人心 2020-11-27 20:32

I vaguely recall seeing this before in an answer to another question, but searching has failed to yield the answer.

I can\'t recall what is the proper way t

8条回答
  •  生来不讨喜
    2020-11-27 20:43

    All of these will compile, are legal and are equivalent:

    Type* instance;
    Type * instance;
    Type *instance;
    

    Pick a style and be consistent.

提交回复
热议问题