Hi,
Actualy (maybe I wrong) but it leads to the same result in that case
that using `reinterpret_cast<const char *>`

my problem about doing that is I don't know if it's safe...
I mean, should I not get some mess with some char code
(UTF8)?

I was expecting some people already did a such cast in the
past and just tell me quickly what strategy I should  use.

Anyway, don't waste your time on that, I stay with my solution and I'll
see in the future if I get some issue.

thank you John.

regards,
Nicolas


Le Wed, 12 Aug 2015 08:50:26 -0500,
John McKown <john.archie.mckown at gmail.com> a ?crit :

> On Tue, Aug 11, 2015 at 9:06 PM, Nicolas J?ger
> <jager.nicolas at laposte.net> wrote:
> 
> > Hi,
> > I have some basic problem, but I didn't found the solution so far...
> > maybe some people are using C++ and already deal with that problem :
> >
> > conversion from ?const unsigned char*? to non-scalar type
> > ?std::string
> >
> > I got the `const unsigned char*` from `sqlite3_column_text()` and I
> > want to pass the result as a `std::string` parameter to a C++
> > function
> >
> > regards,
> > Nicolas J.
> >
> 
> ?Hi! Idiot me again after a bit of sleep. Have you considered casting
> away the "unsigned"-ness?
> 
> const char *someVar = (const char *) sqlite3_column_text(...)?
> 
> ?;
> std::string some?String(someVar);
> 

Reply via email to