Gregor to Programmer Humor@programming.dev • 1 year agoC memegregtech.euimagemessage-square18fedilinkarrow-up1230arrow-down118cross-posted to: programmerhumor@lemmy.ml
arrow-up1212arrow-down1imageC memegregtech.euGregor to Programmer Humor@programming.dev • 1 year agomessage-square18fedilinkcross-posted to: programmerhumor@lemmy.ml
minus-square@xmunk@sh.itjust.workslinkfedilink19•1 year agoPeople who are enthusiastic about using pointers in C++ are doing it wrong. Never use a pointer when you can get away with a reference.
minus-square@KindaABigDyl@programming.devlinkfedilink23•1 year agoFor C++, yes. But “reference” is just a way of using the pointer when it comes to C
minus-square@SpaceNoodle@lemmy.worldlinkfedilink8•1 year agoSure, but that’s technically allocation-agnostic either way.
People who are enthusiastic about using pointers in C++ are doing it wrong. Never use a pointer when you can get away with a reference.
For C++, yes. But “reference” is just a way of using the pointer when it comes to C
Sure, but that’s technically allocation-agnostic either way.