If you put the keyword "inline" before a function, then it is not treated as a function by the compiler. Instead it is treated as normal lines of code. Advantage is that you are saved from the overhead of calling functions on the stack.
If you want to take the name of the file input from the user, its pretty simple. You can write the following code:
string filename;
cout << "Please enter file name: " << endl;
cin >> filename;
ofstream outFile(filename, ios::out);
Regards,
Sami