티스토리 뷰

728x90

1. C++ Value type

 

Group

Type names*

Notes on size / precision

Character types

char

Exactly one byte in size. At least 8 bits.

char16_t

Not smaller than char. At least 16 bits.

char32_t

Not smaller than char16_t. At least 32 bits.

wchar_t

Can represent the largest supported character set.

Integer types (signed)

signed char

Same size as char. At least 8 bits.

signed  short int

Not smaller than char. At least 16 bits.

signed  int

Not smaller than short. At least 16 bits.

signed  long int

Not smaller than int. At least 32 bits.

signed  long long int

Not smaller than long. At least 64 bits.

Integer types (unsigned)

unsigned char

(same size as their signed counterparts)

unsigned short int

unsigned int

unsigned long int

unsigned long long int

Floating-point types

float

 

double

Precision not less than float

long double

Precision not less than double

Boolean type

bool

 

Void type

void

no storage

Null pointer

decltype(nullptr)

 

               - ref : http://www.cplusplus.com/doc/tutorial/variables/

 

2. stdint.h

 

signed type

unsigned type

description

intmax_t

uintmax_t

Integer type with the maximum width supported.

int8_t

uint8_t

Integer type with a width of exactly 8, 16, 32, or 64 bits.
For signed types, negative values are represented using 2's complement.
No padding bits.
Optional: These typedefs are not defined if no types with such characteristics exist.*

int16_t

uint16_t

int32_t

uint32_t

int64_t

uint64_t

int_least8_t

uint_least8_t

Integer type with a minimum of 8, 16, 32, or 64 bits.
No other integer type exists with lesser size and at least the specified width.

int_least16_t

uint_least16_t

int_least32_t

uint_least32_t

int_least64_t

uint_least64_t

int_fast8_t

uint_fast8_t

Integer type with a minimum of 8, 16, 32, or 64 bits.
At least as fast as any other integer type with at least the specified width.

int_fast16_t

uint_fast16_t

int_fast32_t

uint_fast32_t

int_fast64_t

uint_fast64_t

intptr_t

uintptr_t

Integer type capable of holding a value converted from a void pointer and then be converted back to that type with a value that compares equal to the original pointer.
Optional: These typedefs may not be defined in some library implementations.*

             - ref : http://www.cplusplus.com/reference/cstdint/?kw=stdint.h

 

 

3. limits.h


 

              - ref : http://www.cplusplus.com/reference/climits/


댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함