#include <fstream.h>
void main() //程序从这里开始
{
ifstream OpenFile("cpp-home.txt");
char ch;
while(!OpenFile.eof())
{
OpenFile.get(ch);
cout << ch;
}
OpenFile.close();
}
C++输入流
最新推荐文章于 2024-02-02 21:33:13 发布
#include <fstream.h>
void main() //程序从这里开始
{
ifstream OpenFile("cpp-home.txt");
char ch;
while(!OpenFile.eof())
{
OpenFile.get(ch);
cout << ch;
}
OpenFile.close();
}