> To use the sqlite3 return value to initialize a standard string in C++
> you need to do the following:
>
>     const char* p = reinterpret_cast<const
> char*>(sqlite3_column_text(pStmt, 0));
>     std::string zName(p);
>
> The cast changes the type of the return value to match the type needed
> by the string constructor. Then construct a string using that pointer.
> You could combine the two statements into one and eliminate the
> temporary pointer variable if you prefer.

I believe that will crash if the column is null. What does your string
constructor do with null pointers?

Reply via email to