Passing an object to a non-member function
Posted on 2003-03-13
I have written a fairly simply array library, using template-based objects which can be declared with
for an integer array object called "myarray" of 20 rows by 30 cols etc. My query is, how do I pass this array object to a non-member function, in particular using a call-by-reference, so that the function can change the value of one of the array elements? I'm not clear what to put in the function prototype, or the exact method of calling such a function.
Thanks in advance.