IDE gives me this error when I try to compile:
random.h|11|error: expected ',' or '...' before 'arr'|
amongst others but this is the one that is my biggest problem.
I can do this in my main function but I want to do it by calling a function that will initialize any 2D array I give it. Then I have another function for printing the array, but they more or less are the same thing except for the statements. I'm a complete beginner so please feel free to have a few laughs!
void InitializeArray2D(int& arr[int x][int y])
{
for (int i=0; i<x; i++)
{
for(int j=0; j<y; j++)
{
cout<<"arr["<<i<<"]["<<j<<"]=";
cin>>arr[i][j];
}
}
}