Gregor@gregtech.eu to Programmer Humor@programming.dev · 1 month agoC memegregtech.euimagemessage-square18fedilinkarrow-up1222arrow-down118file-textcross-posted to: programmerhumor@lemmy.ml
arrow-up1204arrow-down1imageC memegregtech.euGregor@gregtech.eu to Programmer Humor@programming.dev · 1 month agomessage-square18fedilinkfile-textcross-posted to: programmerhumor@lemmy.ml
minus-squarexmunk@sh.itjust.workslinkfedilinkarrow-up20arrow-down1·1 month 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-squareKindaABigDyl@programming.devlinkfedilinkarrow-up23·1 month agoFor C++, yes. But “reference” is just a way of using the pointer when it comes to C
minus-squareSpaceNoodle@lemmy.worldlinkfedilinkarrow-up8·1 month 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.