C basics, const unsigned char* to integer or bool
<p>I'm trying to get integer or bool from database result this way:</p>

<pre><code>bool tblexist = false;
int t_exists = 0;    

tblexist = (bool)sqlite3_column_text(chkStmt, 1);
t_exists = atoi(sqlite3_column_text(chkStmt, 1));
</code></pre>

<p>... but no one works.<br>
Expected value from sqlite3_column_text(chkStmt, 1) is always 0 or 1.
But I get error message:</p>

<blockquote>
  <p>invalid conversion from ‘const unsigned char*’ to ‘const char*’<br>
    initializing argument 1 of ‘int atoi(const char*)’<br>
    ||=== Build finished: 2 errors, 0 warnings ===|  </p>
</blockquote>

<p>How to solve this and get integer or bool on elegant way? </p>
