Number suffix for short
Possible Duplicate:
How do I write a short literal in C++?
I can use ll to represent a long long number, I can use u to represent a unsigned number, etc.
Is there a number suffix for short type?
The C++ standard only gives these integer suffixes (2.13.1)
unsigned-suffix: one of
u U
long-suffix: one of
l L
long-long-suffix: one of
ll LL
so no, there is no suffix for shorts.
No there is no integer constant suffix for short in C.
In most expressions a short value is promoted to int so it is not so useful. You can cast an int integer constant to short , but with the integer promotions rules, chances are it will be promoted to int .
上一篇: 短,int,long,float,double long,double,char的大小
下一篇: 简称数字后缀
