Game adventure 2

1 #include<iostream>
2 #include<string>
3 #include<cstdlib>
4 using namespace std;
5 struct survivor{
6 string choice;
7 int society;
8 char ctring;
9 bool survived;
10 };
11
12 struct survivor bluelight (struct survivor alive)
13 {
14 cout << "You chose the blue light, You are welcomed to an amazing town of ttiny people in a close. \n They take care of you until you can walk again" << endl;
15 cout << "You can walk now what should you do?" << endl;
16 cout << "1) Walk away" << endl;
17 cout << "2) Thank them, and leave" << endl;
18 cout << "3) Thank them, and ask for a way out" << endl;
19 int gesture;
20 cin >> gesture;
21
22 switch(gesture)
23 {
24 case 1:
25 alive.ctring='n';
26 cout << "You just walked away and they attacked you, You died" << endl;
27 break;
28 case 2 :
29 alive.ctring='l';
30 cout << "They ignored your gratittude, but you left and got lost and never found your way out" << endl;
31 break;
32 case 3 :
33 alive.ctring='r';
34 cout << "They heard your plead and gave you a map to the exit" << endl;
35 break;

35 break;
36 }
37 return alive;
38 }
39 int main()
40 {
41 bool win_game=false;
42
43 struct survivor alive;
44 alive.society = 0;
45 alive.ctring='x';
46 alive.survived=true;
47
48
49 cout << "You wake up in a dark room and you see two lights \n Theres a blue light and a red light \n Which one would you follow? " << endl;
50 getline(cin, alive.choice);
51 cout << "You Chose" << alive.choice << endl;
52 while(alive.survived=true && win_game == false)
53 cout << "1) Follow thee blue light. " << endl;
54 cout << "2) Follow the Red light. " << endl;
55 int path;
56 cin >> path;
57 system("clear");
58 switch(path)
59 {
60 case 1:
61 alive=bluelight(alive);
62 break;
63 case 2:
64 //alive=redlight(alive);
65 //break;
66 }
67 if(alive.ctring='n')
68 {
69 cout << "You have made the little men angry you are dead" << endl;
70 alive.survived=false;
71 }
72 if (alive.ctring='l')
73 {
74 cout << " You didnt ask for help so now your lost and slenderman gets you" << endl;
75 win_game=true;
76 }
77 return 0;
78 }

____
I get this error when i compile i dont know what to do
ad.cpp:66:8: error: expected primary-expression before '}' token
}
^

case 2 does not contain a statement
Topic archived. No new replies allowed.