https://blog.csdn.net/louislee92/article/details/50390000
vs2008利用sqlite A
添加sqlite3.h sqlite3.lib到工程目录里
#include <iostream> using namespace std; #include "sqlite3.h" #pragma comment(lib,"sqlite3.lib") void main(int argc,char * argv[]) { int ret = 0; sqlite3 * db = 0; ret = sqlite3_open("./test.db", &db); if ( ret != SQLITE_OK ) { fprintf(stderr, "Could not open database: %s", sqlite3_errmsg(db)); exit(1); } printf("Successfully connected to database "); system("pause"); }
编译运行