Skip to content

Instantly share code, notes, and snippets.


videlais/test.cpp Secret

Created Dec 12, 2018
What would you like to do?
#include <iostream>
#include <sqlite3.h>
using namespace std;
int main()
// Pointer to SQLite connection
sqlite3* db;
// Save the connection result
int exit = 0;
exit = sqlite3_open("example.db", &db);
// Test if there was an error
if (exit) {
cout << "DB Open Error: " << sqlite3_errmsg(db) << endl;
} else {
cout << "Opened Database Successfully!" << endl;
// Close the connection
return (0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.