1 2 3 4 5 6
int main(int argc, char **argv) { double elapsed = (double)(198 - 109) + (double)(198000000 - 109000000)/1000000.0; long elapsed2 = ((double)(198 - 109) + (double)(198000000 - 109000000))/100000.0; cout << elapsed << endl << elapsed2; }
1 2 3
cc1plus: warnings being treated as errors In function 'int main(int, char**)': Line 4: warning: converting to 'long int' from 'double'