Thursday, August 30, 2007

Using arrays for passing by reference

A very common thing you learn when learning a new language specifically C or C++; passing an array name as an argument leads to passing by reference.
What you can do with it:
Supposedly you want to pass a large amount of similar data ( eg. lots of variables concerning a rocket's trajectory) then you can store all data in an array and send it off. Obviously all data must be of same data-type.

No comments: