I need simple modulo counter like: 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0...
How to proper implement this? Increment unsigned int variable and using operator% (var % 6) or increment variable and checking if it is equal to 6 then assign 0.
unsigned int
operator%
var % 6
Aucun commentaire:
Enregistrer un commentaire