#include <iostream>
#include <fstream>
using namespace std;

int main()
{
		ifstream fin("d:\\data\\english_story.txt");
	if(fin.good())
	{
		cout<<"打开文件成功,以下是文件内容"<<endl;
		char ch;
		while (!fin.eof())//未到文件尾时循环
		{
			ch=fin.get();
			cout<<ch;
		}
	}
	else cout<<"打开文件错误"<<endl;
	fin.close();
	return 0;
}


相关文章:

  • 2021-10-03
  • 2021-08-22
  • 2021-09-04
  • 2022-01-22
  • 2021-10-06
  • 2021-06-10
  • 2022-01-29
猜你喜欢
  • 2021-06-03
  • 2021-09-14
  • 2021-11-29
  • 2021-06-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案