Hej!
mam taki oto fragment kodu:
while (getline(input, line))
{
if (line.substr(0,how_many_chars) != string::npos)
cout << endl << line;
}
I wyskakuje mi taki błąd:
|error: no matching function for call to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::substr(int, std::string&)'|
D:\Programy\Dev-Cpp\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\include\c++\3.4.2\bits\basic_string.h|1839|note: candidates are: std::basic_string<_CharT, _Traits, _Alloc> std::basic_string<_CharT, _Traits, _Alloc>::substr(typename _Alloc::size_type, typename _Alloc::size_type) const [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]|
||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|
Co on oznacza i jak mogę go usunąć?