【发布时间】:2014-09-03 07:43:21
【问题描述】:
我使用fstream 打开一个文件以进行写入。
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>
缺少什么?
【问题讨论】:
-
为我工作,你能添加更多代码吗?
-
这是整个代码。这种错误的触发因素是什么?你遇到过吗?
-
请创建Minimal, Complete, and Verifiable example 并展示给我们,如果构建时有更多消息,请展示所有消息。