Lessons
C++ · Ready-made Containers · 38. map and set

step 1 of 7

A label on every box

A map keeps a value for each key. Here the key is a word and the value is a price.

price["milk"] means: find the box labelled milk.

Mission

Add bread at 800 tg, and print its price under the milk.

PIP·1
main.cppyour code
1
2
3
4
5
6
7
8
9
10
11
12
← press me!
readyscreen

Press RUN to see what this program does.

Do the mission and Next turns green.

map and set