C++實現文件寫入和讀取

簡要例子:html #include <fstream> using namespace std; void f( ) { ofstream out("abc.txt"); out << 3 << '\t' << "abc" << endl; out.close( ); } 實際上就是把輸出到屏幕上的cout,輸出到了文件中fout。ios #include <iostream>
相關文章
相關標籤/搜索