mardi 23 mai 2017

cannot convert const wchar_t* to const char*

ALL,

Can someone explain to me why this code:

std::wstring query1 = L"SELECT....";
res = mysql_query( m_db, m_pimpl->m_myconv.from_bytes( query1.c_str() ).c_str() );

gives me an error from the subject?

I do have -DUNICODE defined inside C++ options

I guess I just need a pair of fresh eyes.

Thank you.

It is on Gentoo Linux with gcc5.4.

Aucun commentaire:

Enregistrer un commentaire