#include<iostream>
#include<boost/token_iterator.hpp>
#include<string>
#ifdef BOOST_BORLANDC
template class boost::token_iterator_generator<boost::offset_separator>::type;
#endif
int main(){
using namespace std;
using namespace boost;
string s = "12252001";
int offsets[] = {2,2,4};
offset_separator f(offsets, offsets+3);
typedef token_iterator_generator<offset_separator>::type Iter;
Iter beg = make_token_iterator<string>(s.begin(),s.end(),f);
Iter end = make_token_iterator<string>(s.end(),s.end(),f);
for(;beg!=end;++beg){
cout << *beg << "\n";
}
return 0;
}