Quick question on c++ ofstream. in my main i have it declared as int main(int arg, char*argv[]). so that when i run the following command ./program.cpp test.txt it will run my program and pass the test.txt file into it. My question is how do i save my output file as the file name i passed in. i know to use ofstream but im not sure how to pass in the file i passed into my program to test. I have the following code.any help would be great. thanks
ofstream myfile(" ", ios::out);
ofstream myfile(" ", ios::out);
Comment