I've looked around and I haven't found a good answer.
I have files like this: text1.txt text2.txt text3.txt
user wants to specify which file to open:
int x;
string filename;
cout << "What data file do you want to open? (enter an int between 1 -> 3): ";
cin >> x;
filename = "P3Data" << x << ".txt" ; //does not compile
myfile.open(filename);
What is the proper way to do this?