read.cpp: In function ‘int main()’: read.cpp:13: error: no matching function for call to ‘std::basic_ofstream<char, std::char_traits<char> >::basic_ofstream(std::string&)’ /usr/include/c++/4.3/fstream:572: note: candidates are: std::basic_ofstream<_CharT, _Traits>::basic_ofstream(const char*, std::_Ios_Openmode) [with _CharT = char, _Traits = std::char_traits<char>] /usr/include/c++/4.3/fstream:556: note: std::basic_ofstream<_CharT, _Traits>::basic_ofstream() [with _CharT = char, _Traits = std::char_traits<char>] /usr/include/c++/4.3/iosfwd:89: note: std::basic_ofstream<char, std::char_traits<char> >::basic_ofstream(const std::basic_ofstream<char, std::char_traits<char> >&) |
|
|
|
|
ofstream file_out(filename.c_str());
compiles fine for me.