On Jan 28, 1:08 pm, Gary Wessle <phd...@yahoo.com> wrote:
> #include <iostream>
> using namespace std;
>
> int main(){
> double b = 0.04;
> int a;
> a *= b;
> cout << a << endl;}******************************************** ********************
>
> do I leave the compiler to do the conversion or should I
> static_cast<double> (a) before a *= b?
> then
> static_cast<int> (a) again when finished?
What are you trying to do? a is not initalized, so your program
produces undefined results. If you give us some reasonable code to
look at, we can probably help.
----
Ivan
http://www.0x4849.net