I'm getting [Error] invalid conversion from 'int' to 'int(*)[3]' [-fpermissive]
in a few spots of my code. This snippet in particular has that error
void getSquare(int square[3][3]){
int column;
for (int i = 0; i < 3; i++)
{
for (int j = 0; j < 3; j++)
{
cout << "Please enter a number between 1 and 9" << endl;
cin >> column;
cout << endl;
square[i][j] = square[i][column];
}
}
}
This code is designed to take in 9 numbers and store them in a [3][3] array, I might have this completely wrong but let me know!
Here is how the code is being called for those of you who asked
int main(){
int magicSquare[3][3];
getSquare(magicSquare[3][3]);
checkSquare(magicSquare[3][3]);
if (checkSquare(magicSquare[3][3]) == true)
{
cout << "Yes!"
}
if (checkSquare(magicSquare[3][3]) != true)
{
cout << "No!"
return 0;
}