Concept Flow - Why pointers are needed
Start with variable x
Pass x to function
Function receives copy of x
Modify copy inside function
Return from function
Original x unchanged
Use pointer to x
Function receives address of x
Modify value at address
Return from function
Original x changed
End
This flow shows how passing a variable copies it, so changes don't affect the original, but passing a pointer lets the function change the original variable.