I'm trying to use std::ofstream to create a file but I'm getting an error. I'm using a string variable instead of a string. example below.
std::ofstream Myfile("C:\\testfile.html"); // This works fine
//but the below doesn't
string mystring = "C:\\testfile.html";
std::ofstream Myfile(mystring); //doesn't work. Not sure why.
Any clues?