passing struct vs. reference
Hi,
I don't know if I am getting the terminology quite correct, but hopefully people will understand what I mean and be able to give some advice.
Is there any speed differences, or pros/cons, to passing a stucture in a function versus passing a reference to a structure? Here is what I mean, if I am using the wrong terms:
passing a structure:
Code:
void Init (MY_STRUCT struct);
passing a reference:
Code:
void Init (MY_STUCT *struct);
I've never been able to find the differences explained in any textbooks. If someone knows where it is, I would like to know.
thanks,
Rich