Passing array elements to functionsThis tip submitted by Umer khan on 2010-10-27 21:19:28. It has been viewed 15333 times.
Rating of 5.6 with 136 votes
When you pass full array as argument it passes as reference and their is no need of address operator(&), but when you pass a single array element it passes by value and you have to use address operator to pass it by reference (&)
Passing full array
Passing element of array
Help your fellow programmers! Add a tip!
Want to become a C++ programmer? The Cprogramming.com ebook, Jumping into C++, will walk you through it, step-by-step. Get Jumping into C++ today!