Questions tagged [boost-tokenizer]

The Boost.Tokenizer C++ library provides a flexible and easy to use way to break a string or other character sequence into a series of tokens.

The Boost.Tokenizer C++ library provides a flexible and easy to use way to break a string or other character sequence into a series of tokens.

37 questions
0
votes
4 answers

How to tokenize string by delimiters?

I need to tokenize string by delimiters. For example: For "One, Two Three,,, Four" I need to get {"One", "Two", "Three", "Four"}. I am attempting to use this solultion https://stackoverflow.com/a/55680/1034253 std::vector
Ufx
  • 2,595
  • 12
  • 44
  • 83
0
votes
1 answer

What are the default character separators for boost::char_separator (for use with boost::tokenizer)?

The answer to this question seems like it should be easily obtainable by looking at the Boost documentation for char_separator, or by googling. However, nowhere can I find the answer to this question: What are the default separators for…
Dan Nissenbaum
  • 13,558
  • 21
  • 105
  • 181
0
votes
0 answers

Boost's tokenizer different results under windows & linux

I found some strange thing with boost::tokenizer.( boost version 1.53.0, 1.52.0 ) tokenizer > tok(line); vec.assign( tok.begin(), tok.end() ); ...... double volume = lexical_cast( vec[6] ); This…
0
votes
2 answers

Tokenizing a string inside a Switch case

I am tokenizing a string based on a delimiter (using Boost Tokenizer) and then do stuff with the tokens based on the value of a state variable. The problem I'm having: One of the cases requires the string to be tokenized further. This causes errors…
John
  • 989
  • 1
  • 7
  • 11
0
votes
2 answers

Random behavior of boost tokenizer

I have a problem with boost tokenizer, here is my code: #include #include #include using namespace std; static vector tokenize(const std::string& input, const char delim) { std::cout <<…
Alexandre
  • 807
  • 2
  • 9
  • 15
0
votes
1 answer

c++ Arithmetic word number conversion, please need advice

Thanks Joachim, but i can't get it to compile, i think it might be the way i set it up, so i removed the for loop like you said, and incorporated the functions in my calculator.cpp file. So when i compile the program, it results in the following…
-2
votes
1 answer

unexpected compilation error in a function call (C++)

I have a template function makeMatrix(), code is: template void makeMatrix(string dataFilePath, int adjcMatrix[N][N]) { fstreamExtension fe("adj.txt", ios::in|ios::binary); string s; vector temp; int i = 0; …
Code Devil
  • 17
  • 7
1 2
3