Hello:
I am trying to create a text outfile for a class object after compile time to record data.
I need a way to convert from char * to const char *;
the following does not work:
void CPlayer::InitTxtFile(char * gamename)
{
char buffer[64];
sprintf(buffer,"%s.txt",gamename);
ofstream myfile(buffer);
}
Lets say that gamename variable = Vegas. How do I make ofstream myfile(buffer) work the same as ofstream myfile("Vegas.txt");
Any suggestions are most appreciated.