On Nov 13, 2008, at 2:01 AM, rajdeep.shyam wrote:
> So how to copy the mysql ::string to std::string?
If you simply assign one to the other, it should work, though it won't
work reliably with BLOB data, as it uses a C string pointer. To get a
copy that can cope with embedded null characters, this should work:
mysqlpp::String s1 = ... stuff
std::string s2(s1.data(), s1.length());
However, I suspect your problem isn't actually in the string copy. I
think something else is going on. Please post your code and the
compiler error messages so we can diagnose it.