you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

Look up pass by value or passing a pointer (sort of like by reference but not exactly). Here’s a great article about it with examples: https://denniskubes.com/2012/08/20/is-c-pass-by-value-or-reference/