I have an assignment for programming that is actually pretty easy, if it were not for this error:
"Warning C4244: '+=' : conversion from 'double' to 'float', possible loss of data."
note: I MUST use float for result and rate, and int for duration.
For some reason, I'm allowed to do this
But I'm not allowed to do this
if (hours[i]>40) gross[i]+=.5*(hours[i]-rate[i]); //Error here
//the error is loss of data due to conversion from double to float
//float: gross, rate