JPDev@programming.dev to Programmer Humor@programming.dev · 10 months agoWhitespaceprogramming.devimagemessage-square10fedilinkarrow-up110arrow-down10
arrow-up110arrow-down1imageWhitespaceprogramming.devJPDev@programming.dev to Programmer Humor@programming.dev · 10 months agomessage-square10fedilink
minus-squaresweng@programming.devlinkfedilinkarrow-up2·edit-210 months 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.
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.