Connecting database using C++ Programming

I have a problem about how will I connect my Program or Software to the Database using C++ Programming Language.
Do I have to make a code for connecting my database?
How can I also create a database and what database that could be compatible with C++ Programming?
