Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
try {
//Creates a SQLite connection object
Sqlite::SqliteConnection connection("myProfile.db");
// sqliteExecute(connectionOb, "query"); executes a SQLite query, in this case creates a table
sqliteExecute(connection, "create table if not exists myResume (skills text, proficiency int DEFAULT 5)");
sqliteExecute(connection, "insert into myResume(skills, proficiency ) values (?, ?)", "C++", 7);
auto stmt = Sqlite::SqliteStatement(connection, "select skills, proficiency from myResume");
stmt.execute();
auto row = *begin(stmt);
std::cout << typeid(row).name() << std::endl;
std::cout << std::left << std::setw(8) << row.getString() << " : " << row.getInt(1) << std::endl;
}
catch (const Sqlite::exception &e) {
std::cout << e.errorMessage_ << '(' << e.errorCode_ << ')';
}
I believe trying to get a row from a single row query result will result in:
when using
begin(stmt)to retrieve therowIterator.Example: