#include#include
The number of employees is: 3 The number of employees after clearing is: 0
#include#include
The sum of the numbers is: 30 The sum of the numbers after clearing is: 0In this example, we declare a map object with key-value pairs denoting numbers. After adding numbers to the map, we use the clear() function to remove all the elements from the map. We then try to sum the values of the numbers and get 0 as the result since there are no elements in the map. Package Library: C++ Standard Library