¿Por qué no se puede cumplir con éxito "transform (s.begin (), s.end (), s.begin (), tolower)"
Dado el código:
#include <iostream>
#include <cctype>
#include <string>
#include <algorithm>
using namespace std;
int main()
{
string s("ABCDEFGHIJKL");
transform(s.begin(),s.end(),s.begin(),tolower);
cout<<s<<endl;
}
Me sale el error:
Sin función coincidente para la llamada atransform(__gnu_cxx::__normal_iterator<char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, <unresolved overloaded function type>)
Que hace "tipo de función sobrecargada no resuelta" significa?
Si reemplazo eltolower
con una función que escribí, ya no produce errores.