First you need to learn SQL. If you alreay have that down pat then just create the UPDATE string and send it to the DB like you do the SELECTs. From c++ perspective there is no difference between the two, its just that queries are a little more difficult than updates because you have to process the result sets from queries.
If you re having problems writing the UPDATE string then post what you have so that we can provide specific help. You basically have to expand the string to include the value of all variables, much like you do when displaying it on the console screen. std::stringstream class can help you out with that.