Description : This function is used to return an iterator pointing to past the last element of the map container.
Example :
// Demonstrates end()
#include <iostream>
#include <map>
int main() {
// declaration of map container
std::map<char, int> mymap;
mymap['a'] = 1;
mymap['b'] = 2;
mymap['c'] = 3;
// using end() to print map
for (auto it = mymap.begin(); it != mymap.end(); ++it)
std::cout << it->first << " = "
<< it->second << '\n';
return 0;
}