Skip to main content
All lessons

Maps

8 min · C++

Look up values by key with std::map — C++'s dictionary.

C++ · Maps0/5 cleared

Enemy 1 of 5

A std::map<Key, Value> stores key-value pairs in sorted order. Include <map>. m[key] = value stores and m[key] reads.

You
Pincer Crab

Loading editor...

Ln 1, Col 1Spaces: 4
Sign up to fightTarget output: 10