invalid operands of types 'float' and 'int' to binary 'operator%'

You didn't read this?

Why not?
What could we have done to have made it more obvious?