Possible Duplicate:
C – initialization of pointers, asterisk position
What is the difference between these declarations:
char* str;
and
char *str;
Is there a difference at all?
Another example:
char* str;
struct StrStackLink *next;
Are both str and next pointers or is there any significance in the placement of the star?
There is no difference – both declare a pointer to a char. There is a difference when you declare multiple variables on the same line however
declares
str1to be a pointer andstr2to be a char, whiledeclares two char pointers