I need to create a new txt file using ofstream, but I need to use a string to name the file.
For example:
string string1 = "testfile.txt";
ofstream myfile;
myfile.open (string1);
but when I try, it says I can do this because string is not a valid variable type for an 'open' call.
Any ideas?