c++ and SQL

Can anyone point me in the right direction on how to combine the codes of c++ and SQL together. I have an idea for an application but I was wondering how the compiler will work. So if you type a simple hello world code in c++ how will the compiler work with SQL. Does anyone have the name of the code that puts them both together or know any links that can help me put with that? Sorry if I worded it wrong just something new to me.

an example like this:

// example c++ code prints
hi enter the name of the account: Bob Tommy

// SQL code prints/sorts the accounts names
Bob Tommy
Last edited on
Here is a link to learn SQL:


In order to actually work with a database you need a library. There are several like MySql, Microsoft Sql Sever, SQLite, etc. A good start could be SQLite:


No need to install anything and good for tests. For a small amount of data within your program the speed suffice.
Registered users can post here. Sign in or register to post.