Boost logo

Boost Users :

From: Aljaz (aljaz.fajmut_at_[hidden])
Date: 2008-07-15 09:27:32


Hello

Why will the following code make my application crash:

int main(){
 std::string s = "Field 1 \"putting quotes around fields, allows
commas\",Field 3";

 boost::escaped_list_separator<char> sep("\"\'", " ,;", "\"\'");
 boost::tokenizer<boost::escaped_list_separator<char> > tok(s, sep);

 for(boost::tokenizer<boost::escaped_list_separator<char> >::iterator
beg=tok.begin(); beg!=tok.end();++beg){
  std::cout << *beg << "\n";
 }
}

What am I doing wrong?
Many thanks in advance!

Aljaz


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net