0

Hi guys, need some help with this.

I googl'ed but found no solution. :icon_sad:

```
#include <iostream>
#include <ctime>
#include <cstdlib>
using namespace std;
void createRationalNo (int, int);
int RationalInfo (int []);
//void printArray (int [], int);
const int MAX = 20;
const int setArray = 5;
int initialArray [setArray][MAX];
int main()
{
cout << "No\tP\tQ\tQuo\tRem\tValue\n\n";
srand(time(NULL));
int sizeArray = rand () % MAX;
createRationalNo (setArray, sizeArray);
//RationalInfo(initialArray);
//printArray (initialArray);
cout << "\n\nSize of Array is " << sizeArray << "\n\n";
system ("pause");
return 0;
}
void createRationalNo (int set, int size)
{
for (int i = 0; i <set; i++)
{
for (int j = 0; j < size; j++)
initialArray [i][j] = rand () % 100;
}
}
int RationalInfo (int initialArray[])
{
int quotient, remainder;
float value;
for (int i = 0; i <setArray; i++)
{
for (int j = 0; j < MAX; j++)
{
initialArray [i+2][j] = initialArray [i][j] / initialArray [i+1][j];
quotient = a/b
remainder = a%b
value = a/b
}
}
}
```

It's not yet complete but I ran into a problem for int RationalInfo (int initialArray[]) at line 51.

I can't spot anything wrong with this.

An error invalid types int [int] for array subscript occurs when I try to compile.

Thanks for helping.