• sweng@programming.dev
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      8 months ago

      You 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.