Error: “expression must have integral or unscoped enum type” [duplicate]
c is double, thus you cannot use the modulo operator %. Use fmod() instead. So change this: to this: As Slava mentioned, you could have used an int instead, like this: which wouldn’t require the use of fmod(). It’s important to understand that the modulo operator % works with ints. As πάντα ρέι mentioned, there … Read more