Later, while expanding the code I had to change the timing for when I print the updated names...so I tried to make a copy to a new string within the cases of the switch statement which look like this:
1 2 3
//strPlayerName is a CString
size_t pos = strPlayerName.find(strPlayerName);
strPlayerTwoName = strPlayerName.substr(pos);
But...when trying to print the 'player__Name' outside the switch statement nothing shows up on the screen.
1 2 3 4 5
constchar *playerTwoName = strPlayerTwoName.c_str();
m_sPlayerTwoName.Format(playerTwoName);
//strPlayerTwoName is here !!!
fout << strPlayerTwoName;
I've checked the strings using fstreams and they appear to be exactly as they should be. I know this must be some sort of bad 'copy' from one CString to another but I'm lost !!! Thank !
Honestly, I'm not sure what happened but I worked on other components for a few hrs and now the .Format() is printing the way it should !! :/
I don't know what could have changed from then to now...my only guess is that I was putting together a fstream and mayyybe that affected things...but none of those strings were connected to it as far as I know...
Anyway...false alarm for now...Thanks for looking :)