Hello. I'm fairly new to C++ and I have a question regarding reading in a value containing the number e from a file. Right now, I have an input file from which I am reading in various values. One of these values is 1e -10, which I am simply reading in as a double like this:

Code:
file.get();
file.ignore(100, "=") >> threshold;
where threshold is a double value that is supposed to be 1e -10 once read in. If I do a cout with that value, it prints out 1e -10 to the screen. However, if I try to do any math with it, it treats it as a 0. For instance, I tried to add 5 to it, and when I did a cout, instead of printing out the value of 1e -5 to the screen, it prints out 5.

I also tried to use it in a while loop that looked something like this:

Code:
while(currBest >= threshold){
//my code
}
However, since threshold is being treated as a 0, the loop continues until currBest reaches 0 when it should end when currBest is either still greater than 1e -10 or equal to it.

I'm wondering if there's a #include I'm forgetting or if I'm just doing something wrong.

If anyone can help me out with this, I'd be grateful.