Adding two multi dimensional arrays together

Hi guys

I am confused on how to do what the title says, I need to add together the contents of the two multi dimensional arrays, I really have no idea how to do this; so at the moment do not have any code; could someone give me an idea on how to do this, thanks.
1
2
3
4
5
6
7
8
9
10
11
12
13
int father[5][5];
int mother[5][5];
int son[5][5];
for(int i=0;i<5;i++)
{
	for(int j=0;j<5;j++)
	{
		father[i][j]=5;
		mother[i][j]=6;
		son[i][j]=father[i][j]+mother[i][j]; // son is the sum of
	}

}
Last edited on
thanks anilpanicker, very helpful :) Will use it for reference. Thanks
Topic archived. No new replies allowed.