View Single Post
Old 08-03-2004, 11:56 AM   #9 (permalink)
Sybase
Registered User
 
Join Date: Aug 2004
Posts: 2
Sybase is on a distinguished road
Send a message via ICQ to Sybase Send a message via AIM to Sybase
Code:
#include <iostream>
#include <string>
using namespace std;

int main()
{
  string charnick = ""; //changed this line
  cout << "Before you may start the game you have to create you character.\n"
    "This will only take a few moments, remember, "
    "that you can at any time in the game type \"help\", "
    "\"exit\" or \"restart\". \n\nNow just follow the instructions point by point."
    "\n\nFirst of all, you need to decide what you will be known as during the game."
    "\n\nWrite the name you wish to be known by here (may not contain any spaces): \n";
  
  getline(cin, charnick);
  cout << endl << endl << "You will henceforth be known as: " << charnick << endl;
  return 0;
}
i didn't read all the posts, but i just took a look at your code. i'm not sure if this helps, but i changed the part where you are calling charnick variable ( string charnick; ) to ( string charnick = "";
Sybase is offline   Reply With Quote