The problem asks to write the declaration for a function that returns a reference. It doesn't mention about taking an array as a parameter. One of the applications of the function that returns a reference without parameter is the getter function of a class. I suggest removing the unnecessary parameter to make the function declaration simpler and also to address the requirement.
Exercise 6.36 and 6.37
The problem asks to write the declaration for a function that returns a reference. It doesn't mention about taking an array as a parameter. One of the applications of the function that returns a reference without parameter is the getter function of a class. I suggest removing the unnecessary parameter to make the function declaration simpler and also to address the requirement.