Original Post
I have a globally defined vector:
std::vectorNow I have code to load level names from a text file into this vector like so:gvLevelList;
char szLevelName[26];
while(!LevelFile.eof())
{
LevelFile.getline(szLevelName, 26);
gvLevelList.push_back(szLevelName);
}
The problem is that when I leave the function that this is in, the data in szLevelName is destroyed, thus destroying the data in the vector. Can anyone tell me how to get around this problem?
Thanks in advance for your assistance.
k9
