Gregor@gregtech.eu to Programmer Humor@programming.dev · 3 months agoC memegregtech.euimagemessage-square18fedilinkarrow-up11arrow-down10file-text
arrow-up11arrow-down1imageC memegregtech.euGregor@gregtech.eu to Programmer Humor@programming.dev · 3 months agomessage-square18fedilinkfile-text
minus-squarexmunk@sh.itjust.workslinkfedilinkarrow-up0·3 months 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-up0·3 months agoFor C++, yes. But “reference” is just a way of using the pointer when it comes to C
minus-squareSpaceNoodle@lemmy.worldlinkfedilinkarrow-up0·3 months 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.