title: sqlite3_step and number of results
body: <p>After I do a <code>sqlite3_prepare_v2()</code> of a statement, then I need to <code>sqlite3_step()</code> it.</p>
  
  <p>For the moment, let's ignore all return values except <code>SQLITE3_ROW</code> and <code>SQLITE3_DONE</code>.</p>
  
  <p>As long as the return value of <code>sqlite3_step()</code> is <code>SQLITE3_ROW</code>, I need to keep calling it, till I get all the results. Then the last return value would be <code>SQLITE3_DONE</code>.</p>
  
  <p>I'm entering my results into a <code>std::vector</code> using <code>push_back()</code>.</p>
  
  <p>From what I've read, this should have an average complexity of O(log(n)) due to the resizing of the internal array of the vector. In order to reduce this complexity to O(1), I need to use <code>reserve()</code> of vector, before doing <code>push_back()</code>.</p>
  
  <p>But then from the sqlite3 API, I can't see a function that returns the total number of results that I would get, before I <code>sqlite3_step()</code> it.</p>
  
  <p>How can I do this with sqlite3?</p>