Possible Duplicate:
How do I write a short literal in C++?
Is there a suffix for short int
numerical constants in C?
There are u
, l
, d
, and f
for unsigned, long, double and float, but I could not find any for short.
I do some very low lever bit meddling and I need numerical constants with the size of 2 bytes. The system I work on guarantees that short int
s are 2 bytes, so that is not a problem. It's embedded, so please don't bother with suggestions about portability.
Checking the C standard, no such prefix exist for shorts.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With