可能重复:
在C中,声明指针的正确语法是什么?
正确的C指针表示法
有什么区别
int* x
Run Code Online (Sandbox Code Playgroud)
和
int *x
Run Code Online (Sandbox Code Playgroud)
(如果存在)?
他们俩都一样.唯一的区别是你不能以这种方式声明许多变量:
int* x, a, b; //a and b are not pointers
int *x, *a, *b; //all are pointers
Run Code Online (Sandbox Code Playgroud)
我使用第一种表示法,对我来说它表明变量有指针类型,而不是指针本身.