How read a filenode with value like 7.6750000000000005e-001 ? [closed]
I'm reading values from a xml file and sometimes I'd a value like 7.6750000000000005e-001 but the FileNode::isReal is not getting it right and when I put (float) file[i] it's getting 0, how do I do to get the right value and why the isReal isn't working properly ?
This tutorial reads in exponentially stored values from a XML/YML file. Could you please check if you are using the same approach? Probably something is wrong in grabbing the data.
well, in this tutorial it shows using integer, I do like I said, float var = (float) file["tag"], and this doesn't work.
Hmmm looking at
I got the idea that the X under mydata is a double. Under point 5 in the explanation it is illustrated how to retrieve using
I am guessing that the exponential number can only be read as doubles, not as float type.
And the crap system destroyed the code sample, but take a closer look at the tutorial and you see what I mean.
this make sense but it's returning 0.00000000000000000 now ...
Could you please add your complete code here ... its pure guessing work now!
wow, sorry ... it's working