Basic and complex data types supported by C ++

basic type

Basic data types (7 types):  
bool (1), short (2), int (4), long (4), float (4), double (8), char (1).

Derivation of basic data:
int8_t (char), int16_t (int), int32_t (int), int64_t (long long)

String type:
char [], char *, string

Container type:

Sequential container:
vector: fast insertion and deletion from the back, direct access to any element, continuous storage
deque: fast insertion and deletion from the front or back, direct access to any element, continuous storage
list: double linked list, fast insertion from anywhere And delete

Associated container:
set: Duplicate values ​​are not allowed
multiset: Duplicate values ​​are allowed
map: One-to-many mapping, fast search based on keywords,
Multimap: One-to-many mapping, fast search based on keywords, duplicate values ​​are allowed, ie Key value may correspond to multiple values

Container adapter:
stack: last in first out
queue: first in first out
priority_queue: the highest priority element is always the first out

Generic support:
template <typename T>

 

 

 

Published 31 original articles · Like1 · Visits1154

Guess you like

Origin blog.csdn.net/quietbxj/article/details/105582208