I need some help to write to a MySQL database using C++. any basic tutorial will be appreciated. I did google but couldn't find a beginner tutorial. I am sort of lost here. :(

I actually wanted a sample code to start on

You won't always find a laid out tutorial for you but a quick glance at the documentation will many times tell you enough for you to make your own samples.

Remember you can read header files too.

This is has a good c++ API for handling databases in the client's computer.
http://www.sqlite.org/

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.