Boost logo

Boost Users :

From: Éò»Û·å (useradd_at_[hidden])
Date: 2005-08-17 05:46:41

The example of
"boost/doc/html/date_time/examples.html#date_time.examples.month_add" can
not be compiled.
I use the vc71+stlport 4.62, the command line is cl /MD /EHsc
I also can not find this example code under the directory
The example code is :
/* Simple program that uses the gregorian calendar to progress by exactly
 * one month, irregardless of how many days are in that month.
 * This method can be used as an alternative to iterators

#include "boost/date_time/gregorian/gregorian.hpp"
#include <iostream>


  using namespace boost::gregorian;

  date d = day_clock::local_day();
  add_month mf(1);
  date d2 = d + mf.get_offset(d);
  std::cout << "Today is: " << to_simple_string(d) << ".\n"
            << "One month from today will be: " << to_simple_string(d2)
            << std::endl;

  return 0;

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at