Could someone explain what is 0U,1U,2U,3U,4U,5U in the picture means? Thank you
Thank you! I understand unsigned/sign. Could you explain what line 39 and 40 does?
they assign numerical values to the enumeration. By default enumerations start in C/C++ with 0, then 1, and so on. So all what this does here is to use unsigned values instead of signed (by default, enums are signed).
In C and C++, any immediate number (0, 1, 2, ...) is of type int, and 'int' is signed.
By adding the 'U' suffix you get an unsigned number, so 0U is zero with type 'unsigned'.
Just plain C/C++ programming