lang:cpp:container
Ceci est une ancienne révision du document !
Différence entre les conteneurs
| Conteneur | Mémoire contiguë |
|---|---|
| vector | Oui |
| array | Oui |
| deque | Non |
| list | Non |
| forward_list | Non |
| stack | Non |
| queue | Non |
| priority_queue | Dépend |
Choosing the Right Container: Sequential Containers Archive du 09/09/2019 le 13/11/2019
std::string et std::array
std::arraytostd::string
std::string str(std::begin(arr), std::end(arr));
std::stringtostd::array
std::string toto("tototototototo1234"); std::array<char, 16> arr{}; std::copy_n(toto.begin(), std::min(toto.length(), static_cast<size_t>(16)), arr.data());
lang/cpp/container.1576707166.txt.gz · Dernière modification : de root
