输入banner图图片脚本导航/分类

C++用sqlite3_open连接打开指定数据库的小问题

stdafx.h" #include "sqlite3.h" #include <iostream> using namespace std; sqlite3 * pDB = NULL; int _tmain(int argc, _TCHAR* argv[]) { //打开路径采用utf-8编码 //如果路径中包含中文,需要进行编码转换
  //指定数据库路径记得写全 并加上 分号 " ; "
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