Actually, I adopted most of how Stroustrup codes. I like it, it's compact and clear (although, I don't put braces on the same line when using C++ because things like initializer lists are too common and becomes confusing).
How do you explain that? '*pCnt' is the "identifier that is a pointer" and it has the type "integer"?
1 2 3 4
int* ptr_1; // ptr_1 is a variable of type pointer to an integer
int *ptr_2; // ptr_2 is a variable of type pointer to an integer
int * ptr_3; // ptr_3 is a variable of type pointer to an integer
int*ptr_4; // ptr_4 is a variable of type pointer to an integer
In reality I think it really doesn't matter because most programmers won't get confused by the asterisk being by the type or the other way around. Only beginners might be confused about it when they are just getting familiar with the syntax.
So it basically comes down to personal preference (IE Whatever you like the look of more, or what makes more sense to you), or your projects coding standards if you are working in a group.
So if you put it like this int* p1; or like this int *p1; it really doesn't matter to me.
I think there is much more serious things in C++ then where we put out asterisks on pointers. For example why the hell aren't they using @ for the reference operator ;p
And has anyone realize Bjarne's coding style is godawful?
I think it's a little ridiculous when a nube like Fredbill is calling Bjarnes style godawful.
And Vlad thinks people stupidly follow "well known idiots like Bjarnes", and adopt bad styling choices like using bracket on starting line. That's pretty ridiculous considering that blindly following Vlad's non-existent logical argument why it's bad would be even stupider.
But what is really ridiculous is that somehow people think this is an important issue, as if your code will be cleaner and prettier in an objective way using a, or b; especially when it comes from nubes who write horribly inelegant/ugly code anyways.
I would not be surprized at all if Bjarne's style of coding is terrible. He has no need to prove himself nor impress anyone.
I try like hell to code in such a way that a beginner could follow my logic, but should Bjarne? He could very well be like, screw you and just try to keep up, and we'd all eat it. He is the man after all.