I'm working in C++ and I'm dealing with an SQLite database. Consider this:
wchar_t s[] = L"This is my wide string. ĂÎȘȚÂăîșțâ";
What should I do to launch a query containing this string? I saw that if I declare my query, for example:
char q[] = "SELECT * FROM 'mydb' WHERE 'something' LIKE '%ĂÎȘȚÂ%'";
The compiler is smart enough to somehow convert those wide chars and the query actually works as expected. But still, how should I declare/create the query array of chars so as to include those pesky characters? I tried with string
and its c_str()
method, wstring
, etc.