One last error please help me fix.thx for help

I have one more error it say (167): fatal error C1075: end of file found before the left brace '{' at 'c:\users\tracy\documents\visual studio 2010\projects\hello world\hello world\main.cpp(23)' was matched, and the code to fix it is this, I would like to say sorry for posting so many posts I just really wanted this code to finish super bad.


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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
#include <iostream>
#include <string>
 
using namespace std;

void menu (int& a)
{
cout << " 1 - Start Game.\n";
cout << " 2 - Online Multiplayer.\n";
cout << " 3 - Clans.\n";
cout << " 4 - Achievements.\n";
cout << " 5 - Downloadable Content.\n";
cout << " 6 - Settings.\n";
cout << " 7 - Exit.\n";
cout << " Enter your choice and press return: ";
cin >> a;
}

void decision(int& a)
{
int choice;
switch (a)
{
 
case 1: 
{
	

	cout<< "Heres the game!.\n";
cout << "To Go Back Press 0.\n";
cin >> a;
}

break;
 
case 2: 
{	
	cout << "Working on Multiplayer!\n";
               cout << "To Go Back Press 0.\n";
			
}
			   
// rest of code here
break;
   

case 3: 
	{	
	std::string clanname;
 
	std::getline( std::cin, clanname ); // <- gets one line of text from the user, puts it in "clanname" variable

std::cout << "your clan name is " << clanname;
}
break;

 break;
 
case 4: cout << "Noob: Play this game online/offline for an hour!\n";
cout << "Grenade Professional: Get two kills with one grenade!\n";
cout << "Pro Shooter: Get 100 head shots!\n";
cout << "Lets Play Online: Play one match online!\n";
cout << "Offline Professional: Beat offlie!\n";
cout << "Online Modes: Play one round on every mode online!\n";
cout << "Sniper Maddness: Play on sniper maddness 10 times!\n";
cout << "Battle: Play on battle 10 times!\n";
cout << "Team Battle: Play on team battle 10 times!\n";
cout << "Versus: Play on versus 10 times!\n";
cout << "To Go Back Press 0.\n";
// rest of code here
break;
 
case 5: cout << "Every thing is 99 cents\n";
            cout << "Skin\n";
               cout << "Gamer Point\n";
   break;
  
 
       case 6: cout << "Profile\n";
               cout << "Gamer Points\n";
               cout << "Skins\n";
               cout << "Options\n";
               break;
 
	case 7: cout << "Exit\n";
    break;
 
break;
default: cout << "Not a Valid Choice. \n";
cout << "Choose again.\n";
break;
 
{

int main()

;}

	int choice;
bool gameOn = true;

menu(choice);
switch (choice)
{
 
case 1: cout << "Heres the game!.\n";
cout << "To Go Back Press 0.\n";
break;
 
case 2: cout << "Working on Multiplayer!\n";
	"To Go Back Press 0.\n";
// rest of code here
break;
   

case 3: 
	{	
 std::string clanname;
 std::getline( std::cin, clanname ); // <- gets one line of text from the user, puts it in "clanname" variable

std::cout << "your clan name is " << clanname;
}
break;
 
break;
 
case 4: cout << "Noob: Play this game online/offline for an hour!\n";
cout << "Grenade Professional: Get two kills with one grenade!.\n";
cout << "Pro Shooter: Get 100 head shots!\n";
cout << "Lets Play Online: Play one match online!\n";
cout << "Offline Professional: Beat offlie!\n";
cout << "Online Modes: Play one round on every mode online!\n";
cout << "Sniper Maddness: Play on sniper maddness 10 times!\n";
cout << "Battle: Play on battle 10 times!\n";
cout << "Team Battle: Play on team battle 10 times!\n";
cout << "Versus: Play on versus 10 times!\n";
cout << "To Go Back Press 0.\n";
// rest of code here
break;
 
case 5: cout << "Every thing is 99 cents\n";
        cout << "Skin\n";
        cout << "Gamer Points\n";
        cout << "To Go Back Press 0.\n";
               break;
  
   case 6: cout << "Profile\n";
               cout << "Gamer Points\n";
               cout << "Skins\n";
               cout << "Options\n";
               cout << "To Go Back Press 0.\n";
               break;
 
   case 7: "Exit\n";
   break;
   
   gameOn = false;
break;
default: cout << "Not a Valid Choice. \n";
cout << "Choose again.\n";
cin >> choice;
break;


system ("pause");
}




again im really sorry if I have been posting or bothering you to much! :(
Instead of

cout << "Choose again.\n";
break;

{

int main()

;}

there should be

cout << "Choose again.\n";
break;

}
}

int main()
{
2 more poped up after I fixed that one, here are what they say, 1>c:\users\tracy\documents\visual studio 2010\projects\hello world\hello world\main.cpp(21): warning C4101: 'choice' : unreferenced local variable
1>c:\users\tracy\documents\visual studio 2010\projects\hello world\hello world\main.cpp(168): fatal error C1075: end of file found before the left brace '{' at 'c:\users\tracy\documents\visual studio 2010\projects\hello world\hello world\main.cpp(98)' was matched, thanks for helping! Your awesome!
The first message is not an error message. It says that you defined variable choice but it is not used further in the code.
As for the second message then the number of open braces shall be equal to the number of closing braces. So check braces.
what at places like these void decision

(int& a)
{
int choice;
switch (a)
{

case 1:
{

what do I do?
Topic archived. No new replies allowed.