Mega Code Archive

 
Categories / C++ / Map Multimap
 

Print the maximum number of key,data 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;  }