JPDev@programming.dev to Programmer Humor@programming.dev · 9 months agoWhitespaceprogramming.devimagemessage-square59fedilinkarrow-up1303arrow-down110
arrow-up1293arrow-down1imageWhitespaceprogramming.devJPDev@programming.dev to Programmer Humor@programming.dev · 9 months agomessage-square59fedilink
minus-squareYaBoyMax@programming.devlinkfedilinkEnglisharrow-up3·9 months agoI think you’ve got it backwards. I learned to read pointer decls from right-to-left, so const int * is a (mutable) pointer to an int which is const while int *const is a const pointer to a (mutable) int.
minus-squareTraister101@lemmy.todaylinkfedilinkarrow-up2·9 months agoFuck me man that’s what I get for writing that just before bed
I think you’ve got it backwards. I learned to read pointer decls from right-to-left, so
const int *
is a (mutable) pointer to an int which is const whileint *const
is a const pointer to a (mutable) int.Fuck me man that’s what I get for writing that just before bed