Hey,
I was curious if there was a way to use SQL in C++. I'm trying to make a program, but using the windows registry is just a pain to manage things. I was curious if there was a way to download some sql source and use that.
For example
Code:
#include <iostream>
#include "sql-essential.h"
using namespace std;
int main ( void )
{
SQLDB sdb; //the db (which would be defined in sql-essential, if something like this exists
sdb.sqlFile ( "sqldata.sql" ); //connects to a file (this program doesn't need to run a SQL server)
int result = sdb.query("SELECT * FROM `table` WHERE a='value'" ); //does query
cout << result << endl; //shows result
return 0;
}
Is there any sort of code like this out there? I know Call of Duty 4 uses some sort of database without having to worry about connecting to a server (I think).
If there is any way of doing SQL in C++ without having to have MySQL running as a service or process in the background I'd be very appreciative.
Thanks in advance,
Guitarist809