Hey all,
I need to open a file for reading. I know that usually you would declare an object like so:
Only problem is I need to declare the filename I need to open at a prompt. In other words, 'myfile' is the filename that needs to be opened but its a variable. How would I go about doing that? Thank you.Code:fstream InputFile; // declaring a stream object InputFile.open("myfile", ios::in);