minus-squarederfl007@lemmy.wtftoProgrammer Humor@lemmy.ml•*Permanently Deleted*linkfedilinkarrow-up4arrow-down1·1 year agoBy value could be described as, the exact same as you at the time of cloning, but it will be its own object and in no way connected to your actions. Whereas by reference would be exactly what you described linkfedilink
minus-squarederfl007@lemmy.wtftoProgrammer Humor@lemmy.ml•they call it gen z c++linkfedilinkarrow-up12arrow-down2·1 year agook boomer linkfedilink
By value could be described as, the exact same as you at the time of cloning, but it will be its own object and in no way connected to your actions.
Whereas by reference would be exactly what you described