//指定数据库路径记得写全 并加上 分号 " ; "
int nRes = sqlite3_open("D:\sqlite\fuck.db;", &pDB); if (nRes != SQLITE_OK) { cout << "Open database fail: " << sqlite3_errmsg(pDB); goto QUIT; } else { cout << "打开数据库成功!" << endl; } QUIT: sqlite3_close(pDB); return 0; }
C++用sqlite3_open连接打开指定数据库的小问题
标签:c++ cout style ret sqlite fail rms pre lse
本文系统来源:https://www.cnblogs.com/maoye520/p/11223844.html
【说明】:本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!