posted on 2008-05-08 10:00 OIO 阅读(5007) 评论(3) 编辑 收藏 引用
真好!大有收获! 回复 更多评论
nt main(int argc, char *argv[]) { fstream fs; fs.open(_T("文本.txt")); fstream fw; fw.open("text.txt"); char arr[LEN] = {0}; wchar_t temp[2*LEN+1] = {0}; int length; if(!fs || !fw) { cout << "Error" << endl; return -1; } while(!fs.eof()) { fs.read(arr, sizeof(arr)-1); cout << arr; fw.write(arr, sizeof(arr)-1); memset(arr, 0, sizeof(arr)); } cout << endl; fs.close(); fw.close(); return 0; } 回复 更多评论
Powered by: C++博客 Copyright © OIO