What type is pQinQplOdds?
If it's a float, then it has only 6 significant digits. When the division is cast to a double, the float is converted to double, the 100 is converted to double, the calcaulation is done as a double and the result is a double.
A double has 15 significant digits. Only 6 have any meaning. The other digits are bogus. Now you cast and chop off the decimals.
You can't say (pQinQplOdds[iOddsCount-1]*100) == 820.00000000 is true.
If may test as true but you can't use the == operator with floating point. Actually, you can't use any of the operators like <,> <=, >=, !=, etc with floating point.
Floating point numbers only close in value may test equal. You need to do the compare based on absolute value by subtracting one float from the other an testing the ressult be within a specified sigma error tolerance.
Google floating point arithmetic.
As a general practice:
1) never mix floating point an integers.
2) avoid floating point at all costs. It's very slow. It's inaccurate. It has automatic rounding that can't be turned off.
3) if you have to use floating point, use only double. Do not use float unless you can write down on paper the precise technical reason you need a float.
Finally, do not cast in C++.