02 Jul, 2011, JohnnyStarr wrote in the 1st comment:
Votes: 0
In gcc 4.5.2 I have this issue
lexer.cpp: In member function bool Lexer::loadFile(const std::string&): lexer.cpp:122:20: error: no matching function for call to std::basic_ifstream<char>::basic_ifstream(const std::string&) /usr/include/c++/4.5/fstream:455:7: note: candidates are: std::basic_ifstream<_CharT, _Traits>::basic_ifstream(const char*, std::ios_base::openmode) [with _CharT = char, _Traits = std::char_traits<char>, std::ios_base::openmode = std::_Ios_Openmode] /usr/include/c++/4.5/fstream:441:7: note: std::basic_ifstream<_CharT, _Traits>::basic_ifstream() [with _CharT = char, _Traits = std::char_traits<char>] /usr/include/c++/4.5/iosfwd:111:11: note: std::basic_ifstream<char>::basic_ifstream(const std::basic_ifstream<char>&)
It seems that sending const string& for the file path is not working in gcc. Works fine in MS VC++. Not really sure what to do about this. Should I convert the string to a c_str?
It seems that sending const string& for the file path is not working in gcc. Works fine in MS VC++.
Not really sure what to do about this. Should I convert the string to a c_str?