lemmydividebyzero@reddthat.com to Technology@lemmy.worldEnglish · 11 hours agoName before type: why 'age int' is better than 'int age'benhoyt.comexternal-linkmessage-square36fedilinkarrow-up136arrow-down115
arrow-up121arrow-down1external-linkName before type: why 'age int' is better than 'int age'benhoyt.comlemmydividebyzero@reddthat.com to Technology@lemmy.worldEnglish · 11 hours agomessage-square36fedilink
minus-squarejdr@lemmy.mllinkfedilinkEnglisharrow-up3·2 hours agoThat’s why you write int *x, y, **z; C doesn’t write like “x is an int-pointer”, rather it says “dereferencing x will get you an int”.
minus-squareanotherandrew@lemmy.mixdown.calinkfedilinkEnglisharrow-up2·28 minutes ago100% and why I think int* should be at the least a compiler warning, perhaps an outright error with pedantic enabled.
That’s why you write
int *x, y, **z;
C doesn’t write like “x is an int-pointer”, rather it says “dereferencing x will get you an int”.
100% and why I think
int*should be at the least a compiler warning, perhaps an outright error with pedantic enabled.