print the maximum number of pairs that DateMap can hold : pair « Map Multimap « C++






print the maximum number of pairs that DateMap can hold

   
#include <map>
#include <iostream>
#include <string>

using namespace std;

typedef map<string, int> STRING2INT;

int main(void)
{
    STRING2INT DateMap;
    STRING2INT::iterator DateIterator;
    string DateBuffer;

    cout << "DateMap is capable of holding " << DateMap.max_size()
         << " <string,int> pairs" << endl;

 }
  
    
    
  








Related examples in the same category

1.Inserting pairs of object into map
2.Use map to store the value of the month name and its day number
3.Iterating over the elements of the map and using the current pair option and second elements.
4.Put pairs to map with insert
5.Map for string key and integer value
6.for each basic
7.Computing the Median 1
8.Sort a list of int and string pairs
9.Pass output message function to for_each function