ZILtoid1991@lemmy.world to Programmer Humor@programming.dev · 4 days agoPointers explained:lemmy.worldimagemessage-square73linkfedilinkarrow-up11
arrow-up11imagePointers explained:lemmy.worldZILtoid1991@lemmy.world to Programmer Humor@programming.dev · 4 days agomessage-square73linkfedilink
minus-squareSylvartas@lemmy.dbzer0.comlinkfedilinkEnglisharrow-up0·4 days 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-up0·4 days 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).