Text creator game almost done

hello, I have almost finished my text adventure creator but I need some help. It does not work perfectly. I was hoping somebody could run this program and give me some tips and tell me what is wrong.

//
// main.cpp
// Text creator 3
//
// Created by Olivier on 9/30/12.
// Copyright (c) 2012 Olivier. All rights reserved.
//

#include <iostream>
#include <limits>
using namespace std;
void gamemiddle1();
void gamemiddle2();
void gameend1();
void gameend2();
string nameofgame;
string name;
string start;
string startsolution1;
string startsolution2;
string middle1;
string middle2;
string middle1solution;
string middle2solution;
string middle1solution1;
string middle1solution2;
string middle2solution1;
string middle2solution2;
string end1;
string end2;
string end3;
string end4;
void gamestart()
{
cout << "\n";
cout << "\n";
cout << "\n";
cout << "\n";
cout << "Welcome to " << nameofgame;
cout << " by " << name;
cout << ",\n" << start;
cout << " :";
char startsolution[10];
cin >> startsolution;
if (startsolution == startsolution1)
{
gamemiddle1();
}
if (startsolution == startsolution2)
{
gamemiddle2();
}
}

int main(int argc, const char * argv[])

{
cout << "Text adventure creator by Olivier";
cout << " Version 2.0\n";
cout << "Name of game: ";
getline(cin,nameofgame);
cout << "Name of Author: ";
getline(cin,name);
cout << "Enter beginning of Text adventure: ";
getline(cin,start);
cout << "One answer to " << start;
cout << ": ";
getline(cin,startsolution1);
cout << "Another answer to " << start;
cout << ": ";
getline(cin,startsolution2);
cout << "Enter middle of the Text adventure if player types in " << startsolution1;
cout << ": ";
getline(cin,middle1);
cout << "Enter middle of Text adventure if player types " << startsolution2;
cout << ": ";
getline(cin,middle2);
cout << "One answer to " << middle1;
cout << ": ";
getline(cin,middle1solution1);
cout << "Another answer to " << middle1;
cout << ": ";
getline(cin,middle1solution2);
cout << "One answer to " << middle2;
cout << ": ";
getline(cin,middle2solution1);
cout << "Another answer to " << middle2;
cout << ": ";
getline(cin,middle2solution2);
cout << "Enter the end of the game if player types " << middle1solution1;
cout << ": ";
getline(cin,end1);
cout << "Enter the end of the game if player types " << middle1solution2;
cout << ": ";
getline(cin,end2);
cout << "Enter the end of the game if player types " << middle2solution1;
cout << ": ";
getline(cin,end3);
cout << "Enter the end of the game if player types " << middle2solution2;
cout << ": ";
getline(cin,end4);
gamestart();
}
void gamemiddle1()
{
cout << middle1;
std::cin.ignore( std::numeric_limits<std::streamsize>::max(), '\n' );
getline(cin,middle1solution);
if (middle1solution == end1)
{
gameend1();
}

}
void gamemiddle2()
{
cout << middle2;
std::cin.ignore( std::numeric_limits<std::streamsize>::max(), '\n' );
getline(cin,middle2solution);
if (middle2solution == end2)
{
gameend2();
}
}
void gameend1()
{
cout << end1;
}
void gameend2()
{
cout << end2;
}
void gameend3()
{
cout << end3;
}
void gameend4()
{
cout << end4;
}
Can you be a little precise by giving as how it works and how you want it to work?
You have to type in the beginning of the text adventure and then you type two possible solutions to that and than type two middles of the text adventure for each solution and give 2 more solutions to that and then finally type in an end of the text adventure. Just run it and see.
Topic archived. No new replies allowed.