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

What are bitwise shift (bit-shift) operators and how do they work?

The bit shifting operators do exactly what their name implies. They shift bits. Here’s a brief (or not-so-brief) introduction to the different shift operators. The Operators >> is the arithmetic (or signed) right shift operator. >>> is the logical (or unsigned) right shift operator. << is the left shift operator, and meets the needs of … Read more