Code:
char secret[81] = {"megan"};
cout<<"+--------------------+\n";
cout<<"|What is your name? |\n";
cout<<"+--------------------+\n\n";
cout<<"\tPlease enter your name: ";
cin.getline(stat.name,80);
if(strcmp(stat.name, secret) == 0)
{
strcpy(stat.classname, "Humanoid");
stat.classn = 9;
stat.maxhp = 100;
stat.hp = stat.maxhp;
stat.maxmp = 100;
stat.mp = stat.maxmp;
stat.attack = 100;
stat.defense = 100;
menu();
}
Some people should answer the whole lot not just 1 or 2 things.
that should fix it cin.getline (stat.name,80,'\n') 80 is how many charactes allowed to be entered and '\n' is when enter is pressed it gets all of the characters