当前位置: 技术问答>linux和unix
求救关于 ofstream !!!在线等,急!
来源: 互联网 发布时间:2015-11-23
本文导语: 出错行: m_FileStream = new ofstream(m_FileName,ios::app||ios::binary); m_FileStream 的类型为:ofstream m_FileStream m_FileName 的类型为:char m_FileName[_MAX_PATH] 已经包含了头文件 提示错误: TBillFile.cpp:456: n...
出错行:
m_FileStream = new ofstream(m_FileName,ios::app||ios::binary);
m_FileStream 的类型为:ofstream m_FileStream
m_FileName 的类型为:char m_FileName[_MAX_PATH]
已经包含了头文件
提示错误:
TBillFile.cpp:456: no matching function for call to `
std::basic_ofstream::basic_ofstream(
char[260], bool)'
/usr/include/c++/3.2.3/iosfwd:89: candidates are: std::basic_ofstream::basic_ofstream(const std::basic_ofstream&)
我的理解是编译器找不到合适的构造函数,但不知道怎么改,弄了三个小时了,求救啊!
m_FileStream = new ofstream(m_FileName,ios::app||ios::binary);
m_FileStream 的类型为:ofstream m_FileStream
m_FileName 的类型为:char m_FileName[_MAX_PATH]
已经包含了头文件
提示错误:
TBillFile.cpp:456: no matching function for call to `
std::basic_ofstream::basic_ofstream(
char[260], bool)'
/usr/include/c++/3.2.3/iosfwd:89: candidates are: std::basic_ofstream::basic_ofstream(const std::basic_ofstream&)
我的理解是编译器找不到合适的构造函数,但不知道怎么改,弄了三个小时了,求救啊!
|
ios::app||ios::binary (不要用||,这样变成了一个bool)
改成
ios::app|ios::binary
改成
ios::app|ios::binary