Solution Review: Map the Days
This lesson discusses the solution to the challenge given in the previous lesson.
We'll cover the following...
We'll cover the following...
In the above code, outside main at line 6, we make a map Days. The declaration of Days shows that its keys will be of int type and values associated with its keys will be of string type. Initialization is as follows:
- Key
1is given Monday as a value. - Key
2is given Tuesday as a value. - Key
3is given Wednesday as a value. - Key
4is