Skip to content

Instantly share code, notes, and snippets.

@crowell
Created January 17, 2015 04:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save crowell/7c44eea61b97db22d946 to your computer and use it in GitHub Desktop.
Save crowell/7c44eea61b97db22d946 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <sqlite3.h>
int main(int argc, char* argv[])
{
sqlite3 *db;
char *zErrMsg = 0;
int rc;
rc = sqlite3_open("test.db", &db);
printf("size: %lld\n", sizeof(db));
if( rc ){
fprintf(stderr, "Can't open database: %s\n", sqlite3_errmsg(db));
return 1;
}else{
fprintf(stderr, "Opened database successfully\n");
}
sqlite3_close(db);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment