title: C++/SQLite only outputting one row of data
body: <p>I'm having an issue where only one of my 5 test rows will output in C++. My code is:</p>
  
  <pre><code>#include &lt;cstdio&gt;
  #include &lt;sqlite3.h&gt;
  #include &lt;windows.h&gt;
  #include &lt;wincrypt.h&gt;
  #include &lt;string&gt;
  #include &lt;vector&gt;
  #include &lt;iostream&gt;
  
  using namespace std;
  /*Definitions*/
  sqlite3 *db;
  void *arg;
  char *err;
  const char* stmt = "SELECT * from table";
  /*End of Definitions*/
  
  int exec(void *arg, int argc, char **argv, char **column) {
      int i;
      for(i = 0; i &lt; argc; i++) {
          cout &lt;&lt; column[i] &lt;&lt; ": " &lt;&lt; argv[i] &lt;&lt; endl;
      }
      cout &lt;&lt; "------" &lt;&lt; endl;
  }
  
  int main() {
      int rc = sqlite3_open("test.sqlite", &amp;db); /*Open db "test.sqlite"*/
      if(!rc) {
          while(true) {
              sqlite3_exec(db, stmt, exec, arg, &amp;err);
              if(err) {
                  break;
              }
          }
      }
      /*Ending Stuffz (NOTHING BEYOND THIS POINT)*/
      cin.get();
      return 0;
  }
  </code></pre>
  
  <p>I am not getting any errors; it is purely just outputting the first row. Any help is appreciated, thanks.</p>