hi
i have this code which i think will access a multi-dimensional array, however it comes out with -85763640!!
it is
the main function
part of lookUp.cpp
does any one know what i'm doing wrong
thanks
ewan
i have this code which i think will access a multi-dimensional array, however it comes out with -85763640!!
it is
the main function
Code:
#include <iostream.h>
#include "lookUp.h"
void main( )
{
lookUp look;
cout << "hello world" << endl;
cout << look.labSeats( 3 ) << " " << endl;
}
part of lookUp.cpp
Code:
int multiArray [5][4] = {
{567,13,53,26},
{557,19,57,26},
{552,23,58,26},
{544,30,59,26},
{467,108,56,28},
};
int lookUp::labSeats( int j )
{
int lab = multiArray[j][0];
cout << lab << endl;
return lab;
}
does any one know what i'm doing wrong
thanks
ewan