SmileeTiger
Programmer
Can anyone think of a more readable way to convert an int to a std::string then what I have below:
std::string FilePath;
std::stringstream ss;
std::string FileNum;
for(int i=0 ; i < 5; i++)
{
ss << i;
ss >> FileNum;
FilePath = "/blah/blah/FileName" + FileNum + ".txt";
cout << "File to open:" << FilePath << endl;
}
std::string FilePath;
std::stringstream ss;
std::string FileNum;
for(int i=0 ; i < 5; i++)
{
ss << i;
ss >> FileNum;
FilePath = "/blah/blah/FileName" + FileNum + ".txt";
cout << "File to open:" << FilePath << endl;
}