In the following example, how would I change it to have the user input the file name? Thanks!
#include<iostream.h>
#include<fstream.h>
void main()
{
ifstream in;
in.open("c:/assignment.txt");
char inchar;
in.get( inchar );
while(!in.eof()){
cout << inchar;
in.get( inchar );
}
in.close();
}