minus-squaresweng@programming.devtoProgrammer Humor@programming.dev•Whitespacelinkfedilinkarrow-up89arrow-down2·edit-21 year agoYou would think so, but int* a, b is actually eqivalent to int* a; int b, so the asterisk actually does go with the name. Writing int* a, *b is inconsistent, so int *a, *b is the way to go. linkfedilink
You would think so, but
int* a, b
is actually eqivalent toint* a; int b
, so the asterisk actually does go with the name. Writingint* a, *b
is inconsistent, soint *a, *b
is the way to go.