Hi, I am writing my entire project in Unicode (otherwise UTF-16) and therefore am using the corresponding *16 sqlite3 api's. However, what I...

How It Works

Get an answer in three easy steps. Here's how it works...

Ask Your Question

1. Ask Your Question

Enter your SQLite question at the top of this page and click Get An Answer.

Pick Your Priority

2. Pick Your Priority

Tell us how quickly you want your SQLite question answered.

Get An Answer

3. Get An Answer

Connect with your programmer via online chat or telephone call.

Answer

Customer
Hi, I am writing my entire project in Unicode (otherwise UTF-16) and therefore am using the corresponding *16 sqlite3 api's. However, what I can't figure out how to use is the sqlite3_errmsg16() function. It returns a const void pointer, which I know is a pointer to a variable to an unknown type. What I need is to be able to take the return of sqlite3_errmsg16() and store that return in a wstring. I have no idea on how to do this since I never use const void pointers. I was going to try something like this: [code]wstring errmsg = static_cast(const_cast(sqlite3_errmsg16( db )));[/code] however, I think I'm doing it all wrong. Thank you for any help you can give.[hr] I found a solution that works, although using wchar_t is annoying and compiler specific. [code]wstring errMsg = static_cast(sqlite3_errmsg16());[/code] I plan to use ICU library to rid myself of the problems associated with wchar_t.
Posted

quoteTestimonialsquote

About ExpertHelp

ExpertHelp is changing the way you connect with service professionals.

Whether you have a quick question while preparing your taxes, troubleshooting a computer problem, or need to hire an attorney, ExpertHelp is the most convenient and affordable way to connect with the right service professional to get the job done.

ExpertHelp has been in business since 2011, is an A+ Rated Better Business Bureau accredited member, and offers a 100% satisfaction guarantee on every question you ask!

More SQLite Questions...

Ask Your SQLite Question & Get An Answer Now!