Is it possible to some how take a file name from cin and use that to open the file?
EXAMPLE:
Sorry if this question is silly, I am still learning!Code:int main() { string filename; cout << "Please enter the file name to open: "; cin >> filename; ofstream a_file ( **HOW TO CALL IT HERE?** ); }
Thank you much