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?
I have been using pointers for a while and used to declare pointers like
int *x;
But noticed thru some code that, the * seems to be after data type in some cases, like
void* setValue(){
/* */
}
What’s the difference and why it’s used like that
Semantically nothing. It is style.
The advantage for putting the star right next to the variable is preventing this common error:
This issue is non-existent with return types, so it matters even less there.