When i try to compile this as part of an objective-c program it gives the warning:
warning: passing argument 1 of 'sqlite3_close' from incompatible pointer type
sqlite3 *db; sqlite3_open('~/Documents/testdb.sqlite', &db); /*stuff*/ sqlite3_close(&db);
An almost identical error is given with nearly any other function call that uses &db.
I don’t think you need the second
&… If this is anything like plain c, you just want to callsqlite3_close(db);(Thereby passing it the pointer itself, rather than the address of the pointer.) Thesqlite3_opencall would, I believe, be left as is.