1
我的問題是,當我運行主.cpp文件中的SQLite控制檯出現,並等待命令,而不是在代碼中執行操作併產生一些輸出。問題是什麼? 好了,代碼只是一個測試,以確保一切正常:SQLite的控制檯運行的C++應用程序後出現
#include "sqlite3.h"
#include "stdafx.h"
#include <iostream>
#include <string>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
sqlite3 *database;
sqlite3_open("Database.sqlite", &database);
sqlite3_stmt *statement;
if (sqlite3_prepare_v2(database, "CREATE TABLE a (b INTEGER, c INTEGER);", -1, &statement, 0) == SQLITE_OK) {
int cols = sqlite3_column_count(statement);
cout << cols;
int result = sqlite3_step(statement);
}
return 0;
}
您需要添加一些代碼,並解釋多一點:) – Pavenhimself
能否請您提供一個[SSCCE(http://sscce.org/)? –
我已經添加了代碼,但我認爲,因爲無論代碼,這個問題似乎 –