array mapping

So I took some of my code for an array map with borders and changed it for a different layout but it is not working. Does the screen size matter or should it not work?

I want the map to be more height then width but it's like the width is set by the screen not my for loop.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
void beginningMap(char m_board[][25])
{
	for (int i = 0; i < 46; i++) 
		{
			for (int j = 0; j < 25; j++) 
			{
				m_board[i][j] = ' ';
				m_board[0][j] = '*';
				m_board[45][j] = '*';
				
				m_board[i][0] = 'X';
				m_board[i][24] = 'X';
				cout << m_board[i][j];
				
				
			}
			
		}
}
That's because you're printing out the whole map in one long line of text (look at line 13 carefully).

Try putting a cout << '\n'; on line 17 and see if that helps.
Thank you. I knew it was something I was missing but I couldn't figure it out.
Topic archived. No new replies allowed.