SO im pretty new to c++ and im trying to pass a 2D array of a struct type by reference to a function. As far as i know they are automatically passed by reference. Here is my code.The problem is probably obvious but i cant figure it out. The complier keeps saying variable or field "function" declared void and bArray was not declared in this scope and it expected ")" before bArray.I think that the compiler is not recognizing that i want to pass an array which is creating the "function declared void" error and is also why it wants a ")" before bArray. So im guessing that my format for my prototype is not correct. Does anyone know what is wrong with it?
it does not know what is ballons. So it will issue an error.
You should place the declaration of balloons before the function declaration.
As for the array then it is passed by value as you specified and is implicitly converted to the pointer to the first element of the array.