Sebastián Salazar Molina. wrote:
> but when I change out to int, it compile fine, when I
> use string, i can't compile:
That's because Row::operator[] returns mysqlpp::String, which knows how
to convert itself to an int, but not to std::string. Without a direct
conversion, your compiler is having to choose among the const char* and
char conversions, and doesn't understand that the first is clearly the
right one.
One way to fix it:
String field = actual[f];
return string(field.data());
Another way would be to add a std::string conversion operator to
lib/mystring.h, try it, and report back. If it works and doesn't cause
problems, I'll add it to the next version of MySQL++.