0

the program is supposed to find the sum of 10 integer numbers stored in an array but i'm having this error:

[Error] invalid types 'int[int]' for array subscript.

this is my program:

```
#include<iostream>
using namespace std;
void readarray(int array[][30], int rows)
{
int i=1;
cout<<"Enter 30 Numbers into an array:"<<endl;
for (int j=0;j<10;j++)
{
cout<<"Number "<<i++<<" : ";
cin>>array[i][j];
}
}
int main()
{
int sum=0,array;
int x[30][30];
readarray(x,30);
if (array[30]%2==0)
{
sum+=array[30];
}
cout<<"Sum of even numbers="<<sum<<endl;
cout<<"-----------------------------------"<<endl;
return 0;
}
```