reference means you passing the address of the datatype so it doesn't copy it.. it just modifies whats already there.
You gotta think about cheat engine memory view thing.
when u do
int aInt = 0;
you get 4 slots with 00's cuz int is 4 bytes (4 slots in memory).
when u call by value u just copy and make 4 more slots.. so you got 8 slots now. But you never access the old 4 slots after the copy is complete.. you just copy em over to new slots.
But by reference/pointer you access old slots you created without copying anything.. It's also much faster.. say you want to modify like 5 MB of memory would you copy it to make 10 MB of slots? or just use the current 5 MB of slots..
Yah that swap example teaches it all the best way possible.. how else can you get more then 1 value back without using pointers/reference _________________
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum