Apparently, when I use the unsigned right shift operator (>>>), I receive an error during compilation.
I am using MinGW.
Is this operator not available in C? If so, what would be the equivalent to this?
Thank you,
abraham2119
Printable View
Apparently, when I use the unsigned right shift operator (>>>), I receive an error during compilation.
I am using MinGW.
Is this operator not available in C? If so, what would be the equivalent to this?
Thank you,
abraham2119
There is no >>> in C. If your variable is unsigned, it should happen automatically with >>.
There is unfortunately no >>> operator in C or C++ (though there is in other languages like Java).
The >> operator does what you are expecting. On signed integers, the >> may do sign-extension or it may do an unsigned shift, depending on the implementation. For signed integers, if you need one particular behaviour, you can emulate it yourself with other bitwise operators.