I was going to use math.h on my numbers in my random number generator. It seems that I can only use the math.h functions on doubles. So:
I am trying to give "value" the value of "currentValue", or at least part of the number's value to be transferred over. I am working with a random number generator, so I do not care if the entire number is transferred. I only need part of it to work.
I have at some point:
int currentValue;
double value;
** Through code not shown their values are set. **
Later, I need part of value to go to currentValue.
currentValue = value
I tried:
currentValue = static_cast<int>value;
Any help would be appreciated.
Thanks for the help. The problem is solved.
you forgot the parens: