arrays

what is it mean if I initialize array like below

int array[2][4];
anyone help me explain this please...
That means that you'll have 2 rows and 4 colomns :))

here's a simple one...

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

#include <iostream>
using namespace std;

int main () 
{

	int array[2][4] = {{1,1,1,1}, {2,2,2,2}};

	for (int i = 0; i < 2; i++) {
		for (int j = 0; j < 4; j++)
			cout<<" "<<array[i][j];
		    cout<<endl;
	}

	cin.get(); cin.get();
	return 0;


}	


Topic archived. No new replies allowed.