How would I fill a two-dimensional array up with numbers.
map_height = 9
map_width = 8
I have this code:
for (i=0; i<map_height; i++)
{
for (p=0; p<map_width; p++)
{
room_numbers[i][p] = w;
w++;
}
}
But when I try to print it out it comes up with wierd numbers I printed with:
for (int a=0; a<map_height; a++)
{
for (int b=0; b<map_width; b++)
{
cout << room_numbers[a][b]<< " ";
}
cout << "\n";
}