I am trying to return a two dimensional array of 'room' objects as a kind of print/display of what's in the array.
Room* m_map[10][10];
generated like so:
//Initialise array to NULL
for(int x=0;x<10;x++)
{
for(int y=0;y<10;y++)
m_map[x][y] = NULL;
}
for(int n=0; n<10; n++)
{
for(int ran=0; ran<3; ran++)
{
int r_n = rand() % 10 ;
Room* r = new Room(n, "Normal", true, false, false, true);
m_map[r_n][n] = r;
}
}
So what this gives is a scatter of Rooms in the array.
I'd then like to display/print for the user where these rooms are, in reference to the NULL.
So I could for example if NULL display '#', if it's a Room Leave a ' '.
I'm unsure of the bit I should return in the method.
Any help or pointing in the right direction would really be appreciated