Hi! I am trying to use ofstream. All of the examples I have seen online construct the stream like this:
insert
Code:
ofstream file_writer("my_file_name.txt").
What I would like to do is to create a function that takes a string as an input, something like this:
insert
Code:
int write_stuff_to_a_file(string file_name)
{
    ofstream file_writer(file_name);
        ....
}
However, I get an error because file_name is not the correct type. I did some searching without much luck. I would appreciate some feedback about how to fix this problem. Thank you!