#include<iostream>
#include<fstream>
using namespace std;
int main()
{
ifstream ifle;
char fn[20],ch;
cout<<"輸入文件名:";
cin>>fn;
ifle.open(fn);
if(!ifle)
{
cout<<fn<<"文件不能打開"<<endl;
return 0;
}
while((ch = ifle.get())!=EOF)
cout<<ch;
cout<<endl;
ifle.close();
return 1;
}