摘要: 使用I/O流以文本方式打开上一题建立的文件test1.txt,读出其内容显示出来,看看是否正确。 1 #include <iostream> 2 #include <string> 3 #include<string.h> 4 #include <fstream> 5 using namespace 阅读全文
posted @ 2023-03-27 22:27 nlkdfgnvfdkl 阅读(39) 评论(0) 推荐(0)
摘要: 使用I/O流以文本方式建立一个文件test1.txt,写入字符“已成功写入文件!”,用其它字处理程序(例如windows的记事本程序Notepad)打开,看看是否正确写入。 1 #include <iostream> 2 #include <string> 3 #include<string.h> 阅读全文
posted @ 2023-03-27 22:20 nlkdfgnvfdkl 阅读(50) 评论(0) 推荐(0)