C文件的读取和写入.docx
文本预览下载声明
C++文件的读取和写入.txt
2010-04-08 11:12 笔记:C++文件的读取和写入
#include iostream #include iomanip
#include fstream using namespace std;
int main(){ char buffer[256]; ifstream myfile (c:\\a.txt); ofstream outfile(c:\\b.txt);
if(!myfile){
cout Unable to open myfile; exit(1); // terminate with error
} if(!outfile){
显示全部