C++编译出错时,出错信息好难看懂啊error: no matching function for call to 'std:basic_ofstream<该怎么处理
C++编译出错时,出错信息好难看懂啊。error: no matching function for call to 'std::basic_ofstream<
error: no matching function for call to 'std::basic_ofstream<char, std::char_traits<char> >::basic_ofstream(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
ofstream out((fileName + "_33dd"));
下面这样改就正确了,但我看不懂那编译错误信息在讲什么
ofstream out((fileName + "_33dd").c_str());
------解决方案--------------------
error: no matching function for call to 'std::basic_ofstream<char, std::char_traits<char> >::basic_ofstream(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
ofstream out((fileName + "_33dd"));
下面这样改就正确了,但我看不懂那编译错误信息在讲什么
ofstream out((fileName + "_33dd").c_str());
------解决方案--------------------
- C/C++ code
http://www.cplusplus.com/reference/iostream/ofstream/ofstream/
------解决方案--------------------如需要阅读该回复,请登录或注册****!