I've been trying to run this program for a while, but I can't seem to pinpoint what exactly the errors within it are:
#include <iostream>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <string>
using namespace std;
int main()
{
int choice = 0,num1, num2, useranswer, result;
unsigned seed = time(0);
srand(seed);
string Name, Age, City, College, VideoGame, Pet, Hobby, Senpai;
do
{
cout << "General Information" << endl;
cout << "____________________" << endl;
cout << "Enter your name: ";
getline(cin, Name);
cout << "Enter your age: ";
cin >> Age;
getline(cin, Age);
cout << "Enter the name of a city: ";
getline(cin, City);
cout << "Enter the name of a college: ";
getline(cin, College);
cout << "Enter the name of a video game: ";
getline(cin, VideoGame);
cout << "Enter your preferred choice of pet: ";
getline(cin, Pet);
cout << "Enter your favorite hobby: ";
getline(cin, Hobby);
cout << "Enter the name of someone you respect/look up to (preferably not someone related to you...): ";
getline(cin, Senpai);
cout << "\n Pick your Story\n";
cout << "______________________\n";
cout << "#1. New Anti-Social College Student\n";
cout << "#2. Profesional Wrestler\n";
cout << "#3. Experienced Video Game Player\n";
cout << "#4. Anime School Girl\n";
cout << "#5. Brand New Insert Spider-Man/Woman from Earth-616\n";
do
{
cout <<" Which would you like to try: 1,2,3,4, or 5? ";
cin >> choice;
}while((choice<1) || (choice>5));
switch (choice)
{
case 1:
{
cout << "You are a: New Anti-Social College Student" << endl;
cout << "__________________________________________" << endl;
cout << "You are a new college student by the name of "<< Name <<", and attends "<< College<<"," << endl;
cout << "which is also located in your hometown of "<< City <<". You are" << endl;
cout << " << Age << " "years old and are, as your parents and everyone else would say," << endl;"
cout << " in the prime of your life. You've recently just started college, but" << endl;
cout << "feel very lonely after having to leave your pet " << Pet << " back at home" << endl;
cout << "because college policy doesn't let students bring pets in dorms," << endl;
cout << "unless it's for special purposes. So here you are, first year in" << endl;
cout << "college without any friends or anything to do because you're still" << endl;
cout << " too nervous to approach others, especially since everyone else has" << endl;
cout <<"friends from high school already. Instead of sulking in your room" << endl;
cout <<"you like to play your favorite video game, " << VideoGame <<" on your" << endl;
cout <<" gaming platform quite often. You realize that you can't simply keep" << endl;
cout <<" yourself cooped up in your room all day, you realize you need a hobby," << endl;
cout <<" so you decided to take up " << Hobby << " to help pass the time by more." << endl;
cout <<" Growing up in " << City << ", you never explored the city much so on some weekends" << endl;
cout <<" you decide to take some walks near your college every-so-often to get" << endl;
cout <<" out of the dorm more often." << endl;
return 0;
}
The problems began once I started typing out the situation for case 1, however I'm having issues figuring out what the problems are. Assistance with this would be appreciated.
The compiler error message tells you which line to look at. It's this one: cout << " << Age << ""years old and are, as your parents and everyone else would say," << endl;"