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 = "";