lemmydividebyzero@reddthat.com to Technology@lemmy.worldEnglish · il y a 5 joursName before type: why 'age int' is better than 'int age'benhoyt.comexternal-linkmessage-square66fedilinkarrow-up159arrow-down123
arrow-up136arrow-down1external-linkName before type: why 'age int' is better than 'int age'benhoyt.comlemmydividebyzero@reddthat.com to Technology@lemmy.worldEnglish · il y a 5 joursmessage-square66fedilink
minus-squarejdr@lemmy.mllinkfedilinkEnglisharrow-up8arrow-down1·il y a 5 joursThat’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-up12·il y a 5 jours100% 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.