I'm trying to get integer or bool from database result this way:
bool tblexist = false;
int t_exists = 0;
tblexist = (bool)sqlite3_column_text(chkStmt, 1);
t_exists = atoi(sqlite3_column_text(chkStmt, 1));
... but no one works.
Expected value from sqlite3_column_text(chkStmt, 1) is always 0 or 1.
But I get error message:
invalid conversion from ‘const unsigned char*’ to ‘const char*’
initializing argument 1 of ‘int atoi(const char*)’
||=== Build finished: 2 errors, 0 warnings ===|
How to solve this and get integer or bool on elegant way?
boolandfalseare C++ specific. - Some programmer dudeatoi? C++? :) - Alok Savesqlite3_column_int? - another.anon.coward