SQLite win7

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\n");   
        system("pause");
}     

编译运行

 

posted @ 2018-06-15 14:27  小雨滴答  阅读(123)  评论(0编辑  收藏  举报