Ummm... Fyron, I think you need to be introduced to the wonders of c_str().
code:
#include <string>
#include <fstream>
...
string aString;
...
ofstream outFile(aString.c_str()):
...
The c_str() method of string returns a pointer to a null-terminated array of char. Which is what the fstream classes take in their constructors.