I'm writing a function which accepts a double data type, say variable 't', and if 't' is equal to 0.05, the function does something.
Now, my problem is that if 't' is 100-99.5, the function fails to work. But it works for 't' = 0.05-0. I'm guessing this is something to do with how numbers are stored. What's the work around?
PS : I'm not a programmer, merely using C++ as a tool, so I don't know much about it other than the basics. A simple solution would be very appreciated.