making maze game

Write your question here.
why doesn't it form a simple square
the Hash tag at row 5 and 6 are always out
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
int main()
{
	char Map[10][10]= {"#########",
		           "#       #", 
                           "#       #",
	                   "#       #",
                           "#	    #",
		           "#	    #",
			   "#       #",
			   "#       #",
			   "#########" };
	
	while (GameStatus == true)
	{
		system("CLS");
		for(int i=0;i<10;i++)
		{
			cout<<Map[i]<<endl;
		}
		

	}

}
Case of the misplaced tab.
Go through all the strings in the array and make sure all white space is made by the space character not the tab character
closed account (Dy7SLyTq)
i dont know how well it copied over, but i found a lot of mixing (not uniform i might mention) of \t and " " when i copied into notepad
yes both of you were right is this some kind of bug in c++
is this some kind of bug in c++


No, it isn't a C++ problem. It's just a difference between the way the tab character in interpreted in the code editor, and in the console display. Because these values are user-configurable (often set so a tab is treated as 4 or 8 spaces), then there is no guarantee of consistent behaviour.

The best advice in this case is to consistently use only spaces in the text which is to be output. In source code tabs are also used for indentation and layout, but that too may give inconsistent results when using a different editor etc, so some prefer to just use spaces there too.
Topic archived. No new replies allowed.