comparing elements of two 2d arrays

i need to compare the values of two separate 2d arrays and return true if the corresponding elements in both arrays are equal and false if they are not. this is what i have so far:
//i can print the two arrays but how do i compare their corresponding elements?

#include<iostream>

using namespace std;

int main() {

int array2d[3][2] = {{1,2}, {3,4}, {5,6}};
int isEqual2d[3][2] = {{1,2}, {3,4}, {6,7}};
int i;
int j;
int k;

void print2d(int array2d[][2], int numRows);
print2d(array2d,3);

void print2dd(int isEqual2d[][2], int numRows);
print2d(isEqual2d,3);
}

void print2d(int array2d[][2], int numRows){
for(int i = 0; i < numRows; i++){
for(int j = 0; j < 2;j++){
for(int k = 0; j < 2;j++)
cout << array2d[i][j] << " ";
cout << endl;
}
}
}
void print2dd(int isEqual2d[][2], int numRows){
for(int i = 0; i < numRows; i++){
for(int j = 0; j < 2;j++){
for(int k = 0; j < 2;j++)
cout << isEqual2d[i][j] << " ";
cout << endl;

}
}

}


for(int row = 0; row < max; row++)
{
for(int column = 0; column < max; column++)
{
if(array1[row][column] == array2[row][column])
do something
else
do something else
}
}

Just adjust to fit your code
says my first array isnt in scope.
Topic archived. No new replies allowed.