I am trying to save simpel struct (vector3) in sqlite3_bind_blob, but I have no idea how this works. If I debug this code, it will end the console window. How can I fix this problem?
struct vector3 { int X; int Y; int Z; }; int main () { sqlite3 *db = NULL; sqlite3_stmt *res = NULL; sqlite3_open_v2("SaveGame1.sav", &db, SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE, NULL); string query = "CREATE TABLE IF NOT EXISTS TestPlayer (vector BLOB)"; sqlite3_prepare_v2 (db, query.c_str(), query.length(), &res, 0); sqlite3_step(res);
source share