title: easy way to add 1 month to a time_t in C/C++
body: <p>I have some code that uses the Oracle function add_months to increment a Date by X number of months.</p>
  
  <p>I now need to re-implement the same logic in a C / C++ function.  For reasons I don't want/need to go into I can't simply issue a query to oracle to get the new date.</p>
  
  <p>Does anyone know of a simple and reliable way of adding X number of months to a time_t?
  Some examples of the types of calculations are shown below.</p>
  
  <p>30/01/2009 + 1 month = 28/02/2009<br>
  31/01/2009 + 1 month = 28/02/2009<br>
  27/02/2009 + 1 month = 27/03/2009<br>
  28/02/2009 + 1 month = 31/03/2009<br>
  31/01/2009 + 50 months = 31/03/2013</p>