TA贡献1808条经验 获得超4个赞
#include <fstream>istream& read( char* buffer, streamsize num );ifstream fin( "/tmp/data.txt" );ofstream fout( "/tmp/results.txt", ios::app );while( fin >> temp )fout << temp + 2 << endl;fin.close();fout.close();
TA贡献1883条经验 获得超3个赞
先用int fd=open(“filepath”)打开文件;获得文件描述符然后read(fd,buf,sizeof(buf));
网络编程32讲
¥ 58.00
Linux命令行与Shell脚本编程大全
¥ 68.00
举报