Start here · Essential guide
How to Use a Dictionary in C++ With std::map
Learn how to use a dictionary in C++ with std::map. Add, look up, remove and loop over key-value pairs, and compare it with std::unordered_map.
Strings, Containers and Memory
How std::map works as a dictionary and the main data structures in C.
Start here · Essential guide
Learn how to use a dictionary in C++ with std::map. Add, look up, remove and loop over key-value pairs, and compare it with std::unordered_map.
Learn how to write "I love you" in C with a char array and printf, and see why the char array must hold 11 bytes, including the null terminator.
C++ has no class named Dictionary, but std::map and std::unordered_map store key-value pairs. Here is how they compare, with a short example.
Learn the main types of data structures in C, including arrays, structs, linked lists, stacks, queues, trees, graphs and hash tables, with examples.
Related topics