int main()
{
const int ROW = 2;
const int COL = 7;
int gradebook[ROW][COL] = {0};
int size = 0;
loadData(gradebook);
printArray(gradebook);
return 0;
}
The error is under the comment function prototype. it has the second pair of [] in each function prototype underlined in red. The error I am getting is "An array may not have elements of this type." How do I declare the function prototypes in the top? I will be passing the sizes to the functions in my programs.
The compiler doesn't allow this because it doesn't not how to address the array.
In order to find an instance of a gradebook, the compiler needs to know the dimensions of the array.
Move the following lines before your function prototypes: