一.问题描述
使用I/O流以文本方式打开上一题建立的文件test1.txt,读出其内容显示出来,看看是否正确。
二.设计思路
三.流程图
四.伪代码
1
五.代码实现
1#include<fstream>
#include<iostream>
using namespace std;
int main() {
char ch;
ifstream file2("text.txt");
while (file2.get(ch))
cout << ch;
file2.close();
return 0;
}
浙公网安备 33010602011771号