Last active
November 10, 2018 04:17
-
-
Save atoz-programming-tutorials/b19fa34878631a3dffede3380bc17d87 to your computer and use it in GitHub Desktop.
Support for the video tutorial https://www.youtube.com/watch?v=wRnjahwxZ8A
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <sqlite3.h> | |
int main() { | |
sqlite3 *db; | |
int fd = sqlite3_open("mydb.db", &db); | |
if (fd == SQLITE_OK) { | |
std::cout << "Success opening the database.\n"; | |
} | |
else { | |
std::cerr << "Error:\n"; | |
std::cerr << sqlite3_errmsg(db) << '\n'; | |
exit(1); | |
} | |
sqlite3_close(db); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment