C++ Error Primary Expression Before -


    #include <iostream>     #include <string>      using namespace std;      string name;     string friend;     int gender;     int drive;      int main()     {      //name prompt future reference     cout << "hello. want play game. you'll going on a";     cout << std::endl;     cout << "wild ride it's own ups , downs.";     cout << std::endl;     cout << "to start out name?";     cout << std::endl;     cin >> name;      //determining gender player identifies     cout << "perfect " <<name;     cout << ". shall ask few more questions determine";     cout << std::endl;     cout << "path best suited you.";     cout << std::endl;     cout << "what gender?";     cout << std::endl;      cout << "if male enter 1";     cout << std::endl;     cout << "if female enter 2";     cout << std::endl;     cin >> gender;     cout << std::endl;        //now shall start path determined chosen gender     if(gender == 1)      {cout << "fantastic! you're male means simple.       being said let started.";}     else     {cout << "hmm... seems little difficult our systems indicate putting situations seems little bit more... complex. never matter. let started!";}      cout << std::endl;      //now actual story begins.     if(gender == 2)      {cout << "you've been invited friends party. although mother doesn't";     cout << std::endl;     cout << "like driving far yourself. friend's name?";     cout << std::endl;     cin >> friend;     cout << std::endl;     cout << "they offer drive you, can drive , risk";     cout << std::endl;     cout << "getting trouble mother. option shall choose";     cout << std::endl;     cout << "if want drive enter 1";     cout << std::endl;     cout << "if want "<<friend;     //one of problems primary experession before <<friend     cout << " drive enter 2";     cout << std::endl;     cin >> drive;     cout << std::endl;}     if ((gender == 2) && (drive == 1))     {cout << std::endl;         cout << "you have chosen drive yourself. start car and";         cout << std::endl;         cout << "realize don't have address friends house.";         cout << std::endl;         cout << "you pull on @ nearby gas station text " << friend;         cout << " , ask";         cout << std::endl;         cout << "her address is. reply is";         cout << std::endl;         cout << "just come house. i'll drive there.";         cout << std::endl;         cout << "you decide push issue of driving yourself.";         cout << std::endl;         cout <<friend" texts address , put gps , start driving.";         cout << std::endl;         cout << "you make party , beat "<<friend;         cout << " party";         cout << std::endl;         cout << "by 5 minutes. when gets there says doesn't";         cout << std::endl;         cout << "like fact drove yourself.";     cout << std::endl;}       if ((gender == 2) && (drive == 2))     {cout << std::endl; cout << "you ride " <<friend; cout << " , have fun , crack"; cout << std::endl; cout << "some jokes parents , boys"; cout << std::endl; cout << "you 2 make there , there few other"; cout << std::endl; cout << "people there"; cout << std::endl;}     if ((gender == 2) && (drive <= 2))     {cout << std::endl;         cout << "you @ party , go inside"; cout << std::endl; cout << "your friends house " <<friend; cout << std::endl;}  return 0;     } 

the problem each time expression friend; comes gives me error. i've tried modeling after name; still won't work. i've tried looking answer can not understand of else asking or saying beginner in c++

"the problem each time expression friend; comes gives me error."

friend c++ language keyword. can't use variable name.


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -