Hi everyone,
I'm working with a text file. I want to read a part of it into a string. Here is a sample:
<MEAN method="jackknife">3.97e-06</MEAN>
In the above line i want to put the number 3.97e-06 into a string.
The code that i wrote can find the position of the first digit ( 3 in this case) and the position of the last one in the File. Which means that i have this search function that returns the position of the file pointer. So it returns an int value which is the position of the desired string in the whole file.
Now i don't know how i can read the number using the position of its both ends.
I tried to use getline and substr but they didn't work but i guess they need a different type of the argument .( for example getline needs a pointer to the starting position.)
I can start reading the file line by line and that way i probably be able to simply use getline but i prefer to work with my current search function if it's possible.