Passing input arguments by reference in C.
Hi:
Is it common practice in C to write functions with an input argument such that the caller passes a pointer as the input argument? Example: Code:
|
Quote:
Kevin Barry |
Thanks a lot.
|
The reason for that is because it's much more efficient to copy a pointer than a large struct.
Another use for it is for the function to be able to modify variables passed as parameters. |
Thanks a lot, MTK358.
|
All times are GMT -5. The time now is 12:52 PM. |