Hello guys,
I am a new c++ user and I am having trouble figuring out this error that im given. I am creating a funny choose your own adventure kind of game, and i don't know why i am receiving this error.
The error is on line 35. If someone could help it could really be appreciated!
#include "stdafx.h"
#include <iostream>
#include <string>
usingnamespace std;
int main()
{
cout<< "You are walking in the woods after a wonderful night with your family. You decide to go off the path to see the beautiful scenery.";
cout<< "As you aimlessly walk through the terrain, you turn to your left. You see a dark shadow running towards you. Then you recall the CNN story";
cout<< "you just saw on TV. The Booty Bandit who has escaped from Booty Rehab is after your Booty! What's your next move?" << endl;;
cout<<"Run" << endl;
cout<< "Surrender" << endl;
cout<<"GC (Give Consent)"<<endl;
string Run;
cin>> Run;
if(Run == "Run")
{
cout<< "Thankfully you didn't skip leg day so you dash to the left, narrowly escaping his fingers in the booty. You sprint until you see";
cout << "an abondoned trap house. In the trap house you turn to your left and see Fetty Wap and his trap woes! What will you do next?" <<endl;
cout << "Join" << endl;
cout << "Keep Running" << endl;
}
elseif (Run == "surrender");
{
cout<< "Wow you suck, your booty isn't even worth running? Well shit your screwed :D"<<endl;
}
elseif (Run == "GC");
{
cout<< "The booty warrior decides that he wants the thrill of the chase, and instead of accepting the booty he just leaves." << endl;
}
cout << "Nope, Chuck Testa" << endl;
system("pause");
return 0;
}
take out the semicolon on lines 35 and 30, also for "pause" you need the <cstdlib> included in your program. I don't think you need the first line of code #include "stdafx.h" for this program.