Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/libs/tokenizer/simple_example_3.cpp @ 35

Last change on this file since 35 was 29, checked in by landauf, 16 years ago

updated boost from 1_33_1 to 1_34_1

File size: 682 bytes
Line 
1// © Copyright John R. Bandela 2001.
2
3// Distributed under the Boost Software License, Version 1.0. (See
4// accompanying file LICENSE_1_0.txt or copy at
5// http://www.boost.org/LICENSE_1_0.txt)
6
7// See http://www.boost.org/libs/tokenizer for documenation
8
9// simple_example_3.cpp
10#include<iostream>
11#include<boost/tokenizer.hpp>
12#include<string>
13
14int main(){
15   using namespace std;
16   using namespace boost;
17   string s = "12252001";
18   int offsets[] = {2,2,4};
19   offset_separator f(offsets, offsets+3);
20   tokenizer<offset_separator> tok(s,f);
21   for(tokenizer<offset_separator>::iterator beg=tok.begin(); beg!=tok.end();++beg){
22       cout << *beg << "\n";
23   }
24   return 0;
25}
Note: See TracBrowser for help on using the repository browser.