expected primary-expression before '<<' Token error

i keep getting the expected primary-expression before '<<' error on lines 84-88 if someone could help me figure that out that would be great and as this is my first program i am always open to suggestions on how to improving my coding skills.

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
#include <cstdlib>
#include <iostream>
#include <string>

using namespace std;

int main()
{
  string yourname;
  string input;

//Sets charcter name//
  cout << "Welcome, What is your name?" << endl;
  cout << ">";
  getline(cin, yourname);
  cout << "I see your name is " << yourname << endl;
  cout << "Well " << yourname << " all of Middle Earth is in chaos and we need your help." << endl;

//Sets character class//
  double Strength; //Declare Strength//
  double Health;   //Declare Health//
  double Defense;  //Declare Defense//
  double Mana;     //Declare Mana//
  double Speed;    //Declare Speed//
  int user_answer;

  //Gives you a choice of class to be trained as//
  cout << "What would you like to be trained as: " << endl;
  cout << endl;
  cout << " 1) Warrior\n";
  cout << " 2) Rogue\n";
  cout << " 3) Mage\n";
  cout << endl;
  cin >> user_answer;
  cout << endl;
  switch (user_answer)
  {
      case 1: //Sets stats for a Warrior//
        Strength = 10;
        Health = 20;
        Defense = 10;
        Mana = 5;
        Speed = 5;
        cout << "I see you would like to be a warrior." << endl;
        cout << "Strength: " << Strength << endl;
        cout << "  Health: " << Health << endl;
        cout << " Defense: " << Defense << endl;
        cout << "    Mana: " << Mana << endl;
        cout << "   Speed: " << Speed << endl;
        break;
    case 2: //Sets stats for a Rogue//
        Strength = 10;
        Health = 15;
        Defense = 5;
        Mana = 5;
        Speed = 15;
        cout << "The road to becoming a rogue is a tough one I wish you the best of luck." << endl;
        cout << "Strength: " << Strength << endl;
        cout << "  Health: " << Health << endl;
        cout << " Defense: " << Defense << endl;
        cout << "    Mana: " << Mana << endl;
        cout << "   Speed: " << Speed << endl;
        break;
    case 3: //Sets stats for a mage//
        Strength = 5;
        Health = 10;
        Defense = 5;
        Mana = 15;
        Speed = 15;
        cout << "ahh another wizard we always love to have a few more of you around" << endl;
        cout << "Strength: " << Strength << endl;
        cout << "  Health: " << Health << endl;
        cout << " Defense: " << Defense << endl;
        cout << "    Mana: " << Mana << endl;
        cout << "   Speed: " << Speed << endl;
        break;
    default:
        cout << "I am sorry but that was not one of your choices" << endl;
        break;
  }

//Storyline//
cout << endl;
cout << "You have now choosen your class so it is time to start your training."; << endl;
cout << "I have had a problem with rats in my basement your task is to get rid of them."; << endl;
cout << "You creep down into the basement, you step off the bottom step into a couple "; << endl;
cout << "inches of water and can smell decay in the air. Out of the unlit corner a "; << endl;
cout << "giant rat the size of a rotweiler charges at you.";
cout << endl;
cout << endl;

//Gives you your first choice in the game//
string choice1;
cout << "Do you ";
cout << endl;
cout << endl;
cout << "[1]Stay and fight the rat" << endl;
cout << "[2]Flee back up the stairs" << endl;

///////////////////////////Combat System////////////////////////////////////////

if (choice1=="1")
{
    //Setting Variables//
    double GiantRatHealth = 5;
    double GiantRatDamage = 1;

        while (GiantRatHealth >=1 && GiantRatHealth >=1)
        {
            cout << "The giant rat charges you and bites you on the ankle" << endl;
            cout << "Your Health: " << Health << endl;
            cout << "Giant rats Health: " << GiantRatHealth << endl;
        }








  system("PAUSE");
  return 0;
}
}
Remove the semicolons after the string literals.
Remove semicolons before << endl;

1
2
3
4
cout << "You have now choosen your class so it is time to start your training."; << endl;
cout << "I have had a problem with rats in my basement your task is to get rid of them."; << endl;
cout << "You creep down into the basement, you step off the bottom step into a couple "; << endl;
cout << "inches of water and can smell decay in the air. Out of the unlit corner a "; << endl;
thanks alot its working great now
Topic archived. No new replies allowed.