title: c++ Add or subtract values to the date
body: <p>I couldn't figüre out how to add values to the date. Imagine, I have a date like 2012-5-15. After I parsed it, I obtained the year,month and day seperately and I tried to convert to my exact date to the days by using time_t and mktime. Do I have a chance to convert it back to the date from the days or seconds I found?  Here is part of my code trying to do this;</p>
  
  <pre><code>if(operation="+"){
      tm tm1=make_tm(year,mon,day);
      time_t time1=mktime(&amp;tm1);
      int seconds_per_day=60*60*24;
      time_t second=time1/seconds_per_day;
      int sum=second //Trying to convert to the int from my time_t, don't know      
                     //if it is neccesary
      sum=sum+value //the value I want to add 
  </code></pre>
  
  <p>So, basically if I give an input like 2012/5/15. It calculates how many days it passed by using the method but I just need to convert it to date and make it shown. Do you have any idea?</p>