ZILtoid1991@lemmy.world to Programmer Humor@programming.dev · 1 month agoPointers explained:lemmy.worldimagemessage-square65fedilinkarrow-up1265arrow-down115
arrow-up1250arrow-down1imagePointers explained:lemmy.worldZILtoid1991@lemmy.world to Programmer Humor@programming.dev · 1 month agomessage-square65fedilink
minus-squareSylvartas@lemmy.dbzer0.comlinkfedilinkEnglisharrow-up7·1 month agoMost of the time you pass by reference for more outputs, or by const ref to avoid copying a big-ass data structure
minus-squareDahGangalang@infosec.publinkfedilinkarrow-up2·1 month agoAnother reason I commonly see: to change the structure / “main pointer” to a data structure (esp during freeing and cleanup).
Most of the time you pass by reference for more outputs, or by const ref to avoid copying a big-ass data structure
Another reason I commonly see: to change the structure / “main pointer” to a data structure (esp during freeing and cleanup).