this function below when called gets a value (count) in order to find the right place in the array of doubles (heats) and return that double value. However, when returning, the value is converted from a double to an int.
int Runner::getRuns(int count)
{
return this->heats[count];
}
I have tried to cast it differently, both using
static_cast<DataType>(Value)
as well as prefix notation, but the conversion persists.
Can anyone show me a way to make the double value remain a double when getting passed back to the calling, i e how to avoid the conversion? And why does the conversion occur at all?