
Chandrashekhar Kumar wrote:
Hi,
I have to parse the file, the contents of which(with a header) is below and stuff the double part only to std::vector<double>:
"A","B","C","D" 1,2,3,4 5,6.7,8 ........
<snip> bool parse_numbers(char const* str, vector<double>& v) { return parse(str,
// Begin grammar ( real_p[push_back_a(v)] >> *(',' >> real_p[push_back_a(v)]) ) , // End grammar
space_p).full; } <snip>
But after running it, I am getting the result as "Parsing failed".
I am going thru the doc to understand it better, but any quick spot will help me immensely.
The string that you are parsing begins "A","B","C",... Naturally, it doesn't match a grammar that parses a list of numbers. In Christ, Steven Watanabe