Answer the question
In order to leave comments, you need to log in
Why is (unsigned long)1073741824 * 8 = 0?
At the moment, the variable "Factor" is 1073741824. When I try to multiply it by 8, I get 0.
I tried this: (unsigned long)1073741824 * (double)8 or (unsigned long)1073741824 * 8.0 , everything works, but the result is a floating point number , but I need an integer.
Tell me why is that? How can I fix it?
unsigned long faktor = 1073741824;
faktor = faktor * (unsigned long)8;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question