标签:character unsigned C++ --- types Primer type Types
Variables and Basic Types
Section 2.1 Primitive Built-in Types
2.1.1 Arithmetic Types
include two categories: Integral types(character and boolean types) and floating-point types
char | character | 8bits
wchar_t | wide character | 16bits
char16_t | Unicode character | 16bits
char32_t
int 16bits
long 32bits
float 6 significant digits
double 10 significant digits
wchar_t char16_t char32_t etc are used for extended character sets
the integral types may be signed or unsigned
A signed type represents negative or positive numbers (including 0)
and an unsigned type represents only values greater than or equal to 0
In an unsigned type, all the bits represent the value
and 8-bit unsigned char can hold the values from 0 through 255 inclusive
2.1.3 Literals
the value 20 in three ways:
20 --- decimal
024 -- octal (begain with 0)
0x14 - hexadecimal (begin with 0x or 0X)
'a' --- character literal
"Hello World!" --- string literal
2.3 Compound Types
A compound type is a type that is defined in terms of another type.
two of which --- references and pointers
标签:character,unsigned,C++,---,types,Primer,type,Types 来源: https://www.cnblogs.com/chloristendika/p/15831721.html
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。