Possible duplicate:
The correct way to declare pointer variables in C / C ++
For some time, the following annoyed me: where should I put the star in a notation with a pointer.
int *var;
and
int* var;
obviously do the same thing, and both entries are correct, but I find that most of the literature and code I'm looking at uses the 1st notation.
Wouldnโt it be more โcorrectโ to use the 2nd notation, separating the type and name of the variable with a space, and not mixing the type and variable markers?
c ++ c
Martin Kristiansen Dec 15 '12 at 16:59 2012-12-15 16:59
source share