Axel Dörfler wrote:
Gabriele Biffi <mlist@xxxxxxxxx> wrote:Axel Dörfler wrote:I think "char *variable" is better, because if you write "char* variable1, variable2" can be confusing (variable2 isn't a pointer).* use "char* variable" instead of "char *variable" in C++ codeThat's easy to solve: just don't use that anymore :-)The reason for putting the '*' to the type is that it is actually part of the type, not of the variable name; I would even consider the outcome of "char* a, b" a bug in the language grammar.
That's not a bug, there is a good reason for that. I can't think of a good example right now, I'll look into that.
Now consider this: char* variable1, *variable2; :-) Best regards, Gabriele