Possible Duplicate:
In C, why is the asterisk before the variable name, rather than after the type?
Declaring pointers; asterisk on the left or right of the space between the type and name?請告訴我無效*和void *的之間的區別
我一直在使用指針了一會兒,用來聲明指針像
int *x;
但我們注意到,將向您介紹一些代碼,則*似乎在某些情況下的數據類型,如
void* setValue(){
/* */
}
後有什麼區別,爲什麼它的使用一樣,
這是一種風格的東西.... – Nim 2012-07-17 10:23:21
只需注意:編譯器將輸入流分解爲標記,然後處理這些標記。白色空間不是任何令牌的一部分(儘管它可以用來分隔令牌),所以解析器在這兩種情況下看到的令牌序列是'int','*','x',';'。無論它是寫入int * x;','int * x;','int * x;'還是int * x;(甚至是'int/* obfuscating */*/* comment */x ;'---評論算作白色空間)。 – 2012-07-17 10:32:17
根本沒有區別。無論是使用。 – 2012-07-17 12:11:21