C++文件操做沒法寫入的問題

今天測試C++文件操做時,始終沒法將數據寫入文件中,百思不得其解,最後發現文件操做完成後必定要將文件關閉,即調用close()函數。ios #include <iostream> #include <fstream> #include <string> using namespace std; int main(){ /*fstream file1; ofstream file2;
相關文章
相關標籤/搜索