Continued: I made some test (with MS Visual Studio - depending on your compiler this may differ):
> int array [5][0];
produces two errors:
> error C2466: cannot allocate an array of constant size 0
> error C2087: 'array' : missing subscript
so using the [0] is definiteley wrong here.
Next I tested this code:
> int MainWindow::readFile()
> {
> int array[5][1];
> MainWindow::test( array );
> return 0; // needed to add this to avoid 'error C4716: 'MainWindow::readFile' : must return a value'
> }
>
> void MainWindow::test( int array[5][1] )
> {
> for ( int i = 0; i < 5; i++ )
> {
> std::cout << array[i][0];
> }
> }
This leads to output like
> 9588743800752958733958874906623
since the values in the array aren't initialized
I added initialization in 'readFile' like this:
> ...
> int array[5][1] = { 0, 1, 2, 3, 4 };
> ...
Output is '01234' as expected.
ZOPPO