in C++, the following means "allocate memory for an int pointer":
int* number;
So, the asterisk is part of the variable type; without it, that would mean "allocate memory for an int".
Then, wouldn't it make more sense if the following meant "allocate memory for two int pointers"?
int* number1, number2;
Best Answer
Stroustrup was asked this and he said (paraphrasing)
Works for me. I'm an
Employee* pE
kind of person, but I'm married to anEmployee *pE
kind of person - my advice would be not to get too worked up about it.