I've always put my asterisk like this when creating pointers:
//directly adjacent to the type
int* p = new int();
So i don't confuse a declaration with a dererefence. But then I learned this:
//p is a pointer, q is an int
int* p, q;
Which is misleading to me, so I began putting the asterisk next the variable, not the type. However, this got me thinking. Why did they design it in this way? It's probably terrible to think of it in this manner, but I always thought of the pointer as part of the type. Like, its not a pointer to an int, its an int pointer. I know its not actually like that, but it has always flowed better in my mind. And what really got me thinking is, why the brackets go:
//after the variable
int p[1];
tldr; Why does the asterisk go in front of the variable, but the brackets behind