p.l.e.a.s.e. h.e.l.p. m.e. :D

i am having trouble with my code it keeps giving me an error saying it expected a ";" before string constant. here is my code






#include <iostream>
#include <string>
using std::cout;
using std::cin;
using std::endl;
using std::string;

int main()
{
const int GOLD_PEICES = 900;
int crew, killed, survivors;
string leader, vp, enemy, ship_name, galaxy;
{
cout << "welcome to your space adventure";
cout << "please enter the following so that i can make your adventure \n\n";
cout << "enter a # under 900: " ;
cin >> crew;
cout << "enter a # under 802 : " ;
cin >> killed;
survivors = crew - killed;
cout << "enter your last name : " ;
cin >> leader;
cout "enter your best friends last name : " ;
cin >> vp;
Cout << "enter the last name of an ex boyfriend/girlfriend : " ;
cin >> enemy;
cout << " enter the name or breed of a pet you have or want : " ;
cin >> ship_name;
cout << "enter the funniest word you can think of : " ;
cin >> galaxy;
}

// the story


system("PAUSE");
}
You compiler also usually gives us a line to refer to. You're missing a ">>" pipe on line 23.
Last edited on
Have a good look at these lines:

1
2
3
4
5
cin >> leader;
cout "enter your best friends last name : " ;
cin >> vp;
Cout << "enter the last name of an ex boyfriend/girlfriend : " ;
cin >> enemy;


Your compiler should have given you specific line numbers with those errors. They are very useful indeed.
thanx alot that helps a bunch
Topic archived. No new replies allowed.