1. Notes on unsigned:
1.unsigned int can be abbreviated as unsigned
2. When using char type, char has 3 kinds of situations, Char, signed char, and unsigned char, and when we write char, the compiler will choose from signed Char and unsigned char. Signed char is -127 ~ 127, unsigned char is 0 ~ 255
3. Do not operate on the unsigned int and signed int types, and the int will be converted to the unsigned int type during the operation, resulting in an error in the result of the operation such as int a = 1, unsigned b = 2; A * b! =-2;
2. Notes on literals:
1. There are 3 cases of integer literal (denoted by the decimal 20来):
1. decimal:20
2. octal:02 4
3. hexadecimal:0x14
2. Representation of floating-point numbers:
1. 3.14159
2. 3.14159e0 (denoted by e, e.g. 3e-2 = 0.03, 3e2 = 300)
3. 12. (equivalent to 12.0)
4. . 011
3. About escape sequences (using ' \ ' to denote characters)
1. Common:
: \ \
double quote : \ "
single quote : \
2. We use the \ + octal number or the \x + 16 binary number representation character;
when, \ followed by more than 3 digits, only the first 3 digits represent the character, and \x has no limit
4. prefix and suffix for literal
1. Character is + prefix, number is + suffix
2. Common character prefixes:
U (Unicode character)
U (Unicode character)
L (Wide character)
U8 (Utf-8 (string literals only))
3. Common integer Suffixes
U or u (unsigned)
L or L (long)
ll or ll (Long long)
4. Common floating-point suffixes
F or f (float)
L or L (long double)
C++primer Study Notes (1)-primitive buit-in types and type conversions