I find a error in the document of boost 1.33
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 /DBOOST_LIB_DIAGNOSTIC. I also can not find this example code under the directory "boost\libs\date_time\example\gregorian\". 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> int main() { 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; }
"Éò»Û·å"
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 /DBOOST_LIB_DIAGNOSTIC. I also can not find this example code under the directory "boost\libs\date_time\example\gregorian\".
This example program is in cvs (http://tinyurl.com/9gnxq). Did you build the library first? This example uses one of the to_string functions. These functions depend on the compiled binary libray. I could provide more help if you post your error messages. Bart
participants (2)
-
Bart
-
沈慧峰