1

祝大家有美好的一天!

我尝试从 boost docs pdf 中编译一个小例子:

#include "boost/icl/interval.hpp"
#include "boost/icl/interval_set.hpp"
#include "boost/date_time/posix_time/posix_time_duration.hpp"
#include <boost/icl/ptime.hpp>
#include <boost/date_time.hpp>
#include <iostream>
#include <string>
using namespace std;
using namespace boost;
using namespace boost::icl;
using namespace boost::posix_time;
using namespace boost::gregorian;
...
interval<boost::posix_time::seconds>::type news(seconds(), make_seconds("20:15:00"));
interval<seconds>::type talk_show(make_seconds("22:45:30"), make_seconds("23:30:50"));
interval_set<seconds> myTvProgram;
myTvProgram.add(news).add(talk_show);
// Iterating over elements (seconds) would be silly ...
for(interval_set<seconds>::iterator telecast = myTvProgram.begin();
telecast != myTvProgram.end(); ++telecast)
//...so this iterates over
return 0;

我有错误:错误 C3861:'make_seconds':找不到标识符

如何进行正确的转换?谢谢。

4

0 回答 0