So I wrote myself a little wrapper function to make a prepared statement for me:
sqlite3_stmt* Gladiateur::run_query_unfinalized(string query, vector
Gladiateur::run_query_unfinalized(string query, vector
inputs)
The vector
is a copy, and it ceases to exist when the function returns.
Perhaps you should change it to:
Gladiateur::run_query_unfinalized(const string& query, const vector& inputs)
With a reference, the c_str
should survive to do what you want to get done.