我使用fstream
打開文件以進行寫作。fstream - 無法訪問在類basic_fstream中聲明的私有成員<_Elem,_Traits>
fstream streamFile;
streamFile.open ("C:\\path\\to\\textFile.txt",
fstream::in | fstream::out| fstream::app);
我得到以下錯誤:
cannot access private members declared in class basic_fstream<_Elem, _Traits>
缺少什麼?
適合我,你能增加更多的代碼嗎? – robbannn 2014-09-03 07:51:35
這是整個代碼。這種錯誤的觸發是什麼?你遇到過嗎? – 2014-09-03 07:53:17
請創建一個[最小,完整和可驗證示例](http://stackoverflow.com/help/mcve)並向我們顯示,並且如果在構建時有更多消息,請顯示所有消息。 – 2014-09-03 08:08:43