Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BindParams.hpp中,绑定char* const char* #3

Open
beichen2012 opened this issue Oct 24, 2017 · 0 comments
Open

BindParams.hpp中,绑定char* const char* #3

beichen2012 opened this issue Oct 24, 2017 · 0 comments

Comments

@beichen2012
Copy link

你好,
在BindParams.hpp中, 对于char*const char*BindValue时,使用sqlite3_bind_text传递数据长度参数使用了strlen(t) + 1,请问这里为什么要+1?如果+1的话,在保存时会多保存一个\0,是否是有误?
而且这样会跟std::string的那个函数生成的结果 不一样。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant