3 ms·
It's pretty easy to convince yourself that "* with the type" is wrong when you see this: int* a, b; // a is int* but b is int
by davidkclark 13y ago
It's pretty easy to convince yourself that "* with the type" is wrong when you see this:
int* a, b; // a is int* but b is int
- w0utert 13y agoBingo, that's the exact reason to pair the asterisk with the variable name. Especially in C-family languages where you can actually end up with code that compiles and even works, until it breaks. Think pointer arithmetic on something you assume is a pointer to a signed integer...