int main(int argc, char *argv[])
{
char *errmsg = 0;
int ret = 0;
sqlite3 *db = 0;
//char buf1[1024] = { 0 };
//sprintf(buf1, "C:\\Users\\lenovo\\Desktop\\%s",argv [1]);
ret = sqlite3_open("C:\\Users\\lenovo\\Desktop\\a.db",&db);
if(ret != SQLITE_OK)
{
const char *errmsg =sqlite3_errmsg(db);//打印错误信息unable to open database file
printf("errmsg: %s\n", errmsg);
return -1;
}
无法打开数据库文件,是不是你的系统版本不一致?