oldman:
ok, I must be really messed up.. I write:
int tt=37;
double eu=tt/10;
Comment(eu);
return(0);
and I get "3"
have I been up too late programming? shouldn't I get 3.7 ?
ok, I must be really messed up.. I write:
int tt=37;
double eu=tt/10;
Comment(eu);
return(0);
and I get "3"
have I been up too late programming? shouldn't I get 3.7 ?
I would guess the compilation tries to preserve the most specific type cast, which makes the tt/10 expression result in 3, before it is made into a double 3.0. Try using tt/10.0 instead, which should make it a double-number division.
sonofagun!!! you were right!!!!!!!! thank you!
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
int tt=37;
double eu=tt/10;
Comment(eu);
return(0);
and I get "3"
have I been up too late programming? shouldn't I get 3.7 ?