glibc icon indicating copy to clipboard operation
glibc copied to clipboard

what's wrong?

Open faceface2 opened this issue 8 years ago • 0 comments

hey,guys I'm a chinese;my english is terrible; I'd like to you,i got a bug,you can help me? I used c sqlite api on c++,then,when i used lambda func as sqlite3_exec()'s callback params,but got "Sqlite error: query aborted",and only got a record,this is c and c++ incompatible ? __callback callback = [](void *data, int argc, char **argv, char **azColName) -> int { int i; for (i = 0; i < argc; i++) { printf("%s = %s\n", azColName[i], argv[i] ? argv[i] : "NULL"); } }; rc = sqlite3_exec(db, dml.c_str(), callback , data, &zErrMsg); if (SQLITE_OK != rc) { std::cerr << "Sqlite error: " << zErrMsg << std::endl; sqlite3_free(zErrMsg); return false; } thanks!

faceface2 avatar Dec 15 '17 14:12 faceface2