makeme - I knew about the overloaded constructor, but just out of curiosity I ran my test program with this too. On the intel machine, int(1.0/0.005) gives 199, not 200 (same as with the static_cast<int>()). On PPC, it gives 200.makeme said:3. If you are just doing simple integer math, then there is no need for casting. Just do this: int i = int(1 / .005).
The intel compiler is:
gcc version 3.2 20020903 (Red Hat Linux 8.0 3.2-7)
I have tried the 3.3 and 4.0 compiler on the PPC with no difference. So now the cast really is a side issue. What's going on here?