|
Boost Users : |
Subject: Re: [Boost-users] tokenizer problem
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-03-12 12:55:47
AMDG
Medora Schauer wrote:
> I'm having a problem passing strings into a boost tokenizer. I have been able to get the code to work but I don't think I should have had to do what I did. I don't know if it is tokenizer problem or a compiler problem or my problem.
>
> // This version results in garbage in some tokens.
> char **str = in_strs;
> while (*str){
> str_tokenizer file1_tokens(string(*str), sep); // <-- difference
tokenizer stores the string by reference. The
temporary string is destroyed. Boom.
In Christ,
Steven Watanabe
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