Boost C++ Libraries: Ticket #1798: met an error using boost::tokenizer in multi-times in vs2005, unicode https://svn.boost.org/trac10/ticket/1798 <p> test function: </p> <p> const CHAR* tnotifymsg = “HTTP/1.1 Host: 176.177.193.111 Content-Length: 110 Date : ...... </p> <p> &lt;?xml version="1.0"?&gt; &lt;Encodeing&gt; </p> <blockquote> <p> &lt;Body cls="auto" obj="10001"&gt; </p> <blockquote> <p> &lt;ID&gt;19&lt;/ID&gt; </p> </blockquote> </blockquote> <p> &lt;/ Encodeing &gt;”; </p> <p> CHAR* pSeparator = " ,;\n\r"; </p> <blockquote> <p> int nErrorcode = 0; </p> </blockquote> <blockquote> <p> boost::char_separator&lt;CHAR&gt; sep(pSeparator); std::string strNotifymsg = tnotifymsg; boost::tokenizer&lt;boost::char_separator&lt;CHAR&gt;&gt; tokens(strNotifymsg, sep); </p> </blockquote> <blockquote> <p> boost::tokenizer&lt;boost::char_separator&lt;CHAR&gt;&gt;::iterator itBegin = tokens.begin(); </p> </blockquote> <blockquote> <p> boost::tokenizer&lt;boost::char_separator&lt;CHAR&gt;&gt;::iterator itEnd = tokens.end(); </p> </blockquote> <blockquote> <p> boost::tokenizer&lt;boost::char_separator&lt;CHAR&gt;&gt;::iterator beg = itBegin; </p> </blockquote> <blockquote> <p> <em> error code if "HTTP/1.1" at the beginning of notify message if(_stricmp((*beg).c_str(), "HTTP/1.1") == 0) { </em></p> <blockquote> <p> using boost::lexical_cast; ++beg; nErrorcode = lexical_cast&lt;int&gt;(*beg); </p> </blockquote> </blockquote> <blockquote> <blockquote> <p> return nErrorcode; </p> </blockquote> <p> } else{ </p> </blockquote> <blockquote> <blockquote> <p> <em> else the right message for parser for(; !bFinishFlag; ++beg) { </em></p> <blockquote> <p> ; </p> </blockquote> </blockquote> </blockquote> <p> } </p> <blockquote> <p> } </p> </blockquote> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/1798 Trac 1.4.3