‘{‘ missing function header

I get this error on line 22. What do I do?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
 #include<iostream>

#include <windows.h>
using namespace std;


	
int Map[10][10] = {
						0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
						0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
						0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
						0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
						0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
						0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
						0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
						0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
						0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
						0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};


{
for (int i = 0; i < 10; i++) && (int j = 0; j < 10, j++)
	{
		if (mapCounter == 10)
		{
			cout << "" << endl;
			mapCounter = 0;
		}
		if (map[i][j] == 1)
		{
			cout << "A";
		}
		else if (map[i][j] == 0);
		{
			cout << "";
		}
		mapCounter++;
	}

	system("pause");
	return(0);
}
Last edited on
closed account (E0p9LyTq)
If this is your entire code, where is the beginning of your main() function?
for (int i = 0; i < 10; i++) && (int j = 0; j < 10, j++)
You can't nest for loops using logical operators.

You do it like this:
1
2
3
4
5
6
7
for (int i = 0; i < 10; i++)
{
    for (int j = 0; j < 10, j++)
    {

    }
}

got it, ty
Topic archived. No new replies allowed.