C++ calculation evaluated to 0
- by Alexander Stolz
I'm parsing a file and trying to decode coordinates to the right unit.
What happens is that this code is evaluated to 0. If I type it into gdb the result is correct.
int pLat = (int)(
(argv[6].data() == "plus" ? 1 : -1)
* ( atoi(argv[7].data())
+ atoi(argv[8].data()) / 60.
+ atoi(argv[9].data()) / 36000.)
* 2.145767 * 0.0001);
P.s. If someone knows a better title for this question, please change it