I have the following code:
#include <iostream>
#include <string>
#include "sqlite3.h"
int main()
{
sqlite3* db;
int rc = sqlite3_open("testing.db", &db);
std::cout << rc << std::endl;
std::cout << sqlite3_errmsg(db);
std::cin >> rc;
}
When I run it, the program outputs "21" and "library routine called out of sequence". What am I doing wrong? 21 is the code for SQLITE_MISUSE. See: http://www.sqlite.org/c3ref/c_abort.html