Very basic question: how do I write a short literal in C++?
I know the following:
2is anint2Uis anunsigned int2Lis along2LLis along long2.0fis afloat2.0is adouble'\2'is achar.
But how would I write a short literal? I tried 2S but that gives a compiler warning.
Yeah, it’s not strictly a short literal, more of a casted-int, but the behaviour is the same and I think there isn’t a direct way of doing it.
The following illustrates how much you should worry about this:
Compile -> disassemble ->