What’s the easiest way to parse a file with
[[1, 2, 3, 4], [8, 9, 10, 11], ...]
into a vector of QRectF (a struct with four floats)?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
have you looked at boost’s spirit library? I think it’s an amazing library and if I recall correctly they have examples in the tutorial very similar to what you want.
EDIT: This puts you at about the right place: http://www.boost.org/doc/libs/release/libs/spirit/doc/html/spirit/qi/tutorials/warming_up.html
EDIT:
Sigh…I haven’t looked at c++ in over a year (and I haven’t looked at spirit in over 4 years) so this took about an hour to put together. Here’s the working example: