Another problem is that you are trying to pass the open() function a string, when in actual fact it takes a character array const char *. So either use a character array to store your file path, or use the c_str() member function of your current string to convert it to a char array.
for example:
string filepath = "C:\\";
string filename = "answers.txt";
string file = filepath + filename;
ofstream myfile2(file.c_str());