i suggest you learn to use c++ strings,
if your going to write c++ code,
may want to google search, but here you
go with this, should get you started look
thru it see if you understand ask any question you may
have :
Code:
#include <fstream>
#include <iostream>
#include <string>
using namespace std;
int main()
{
string PlayerFullName, CharacterName, Class, Race;
int hp, xp, Mana, stop;
cout<<"Enter Player Full Name: ";
getline(cin, PlayerFullName, '\n');
cout<<"\nEnter Character Name: ";
getline(cin, CharacterName, '\n');
cout<<"\nEnter Class: ";
getline(cin, Class, '\n');
cout<<"\nEnter Race: ";
getline(cin, Race, '\n');
cout<<"\nHow many Hitpoints?: ";
cin>>hp;
cin.ignore();
cout<<"\nHow much Experience?: ";
cin>>xp;
cin.ignore();
cout<<"\nyour player is.... \n \n \n\n\n\n\n";
cout<<"Player Name: "<<PlayerFullName<<"\nCharacter Name: "<<CharacterName<<"\nclass: "<<Class<<"\nRace: "<<Race<<"\nHitpoints: "<<hp<<"\nExperience: "<<xp;
string filename = PlayerFullName + ".txt";
ofstream Playerfile ( filename.c_str() );
Playerfile<<"Player Name: "<<PlayerFullName<<"\nCharacter Name: "<<CharacterName<<"\nclass: "<<Class<<"\nRace: "<<Race<<"\nHitpoints: "<<hp<<"\nExperience: "<<xp;
cin.get();
return 0;
}
PS
I suppose i should mention that i didnt actually test this code
i wrote it out farely quickly in notepad but it looks good
some im sure it will work.