Differences between pointer declaration [duplicate]
问题 This question already has an answer here : Difference between char* var; and char *var;? [duplicate] (1 answer) Closed 7 years ago . Is there any differences between these two declarations? int* a; int *a; Or these two declarations are the same (pointer to an integer)? 回答1: They're exactly the same, but here's a small gotcha I came across when first learning C years ago. The * binds to the variable , not the type. This means that int* a, b; Declares a as a pointer to int, and b as an int . To