12 Mar
2009
12 Mar
'09
4:55 p.m.
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