mirror of
https://github.com/boostorg/tokenizer.git
synced 2026-01-23 06:02:15 +00:00
16 lines
380 B
C++
16 lines
380 B
C++
// simple_example_4.cpp
|
|
#include<iostream>
|
|
#include<boost/tokenizer.hpp>
|
|
#include<string>
|
|
|
|
int main(){
|
|
using namespace std;
|
|
using namespace boost;
|
|
string s = "This is, a test";
|
|
tokenizer<char_delimiters_separator<char> > tok(s);
|
|
for(tokenizer<char_delimiters_separator<char> >::iterator beg=tok.begin(); beg!=tok.end();++beg){
|
|
cout << *beg << "\n";
|
|
}
|
|
}
|
|
|