Stephan,

On Mon, Nov 16, 2015 at 12:42 PM, Stephan Beal <sgbeal at googlemail.com> wrote:
> On Mon, Nov 16, 2015 at 6:11 PM, Igor Korot <ikorot01 at gmail.com> wrote:
>
>> The variables referenced are defined as "std::string" and the code is in
>> C++.
>>
>
> the std::string(char const *) constructor does  not, last time i checked,
> accept a NULL value. You will need to pass it "" in that case.
>
> [stephan at host:~/tmp]$ cat foo.cpp
> #include <string>
>
> int main(){
>     std::string s(0);
>     return 0;
> }
>
> [stephan at host:~/tmp]$ gcc -o foo foo.cpp -lstdc++
> [stephan at host:~/tmp]$ ./foo
> terminate called after throwing an instance of 'std::logic_error'
>   what():  basic_string::_S_construct null not valid
> Aborted

OK, it looks like the value is NULL instead of "".
I will change the code accordingly.

BTW, are only name, type and pk fields are guaranteed to have a value?

Thank you.

>
> --
> ----- stephan beal
> http://wanderinghorse.net/home/stephan/
> http://gplus.to/sgbeal
> "Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
> those who insist on a perfect world, freedom will have to do." -- Bigby Wolf
> _______________________________________________
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to