Is map empty : map empty « Map Multimap « C++






Is map empty

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

using namespace std;

typedef map<string, int> STRING2INT;

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

    if(!DateMap.empty())
        cout << "DateMap has " << DateMap.size() << " entries" << endl;
    else
        cout << "DateMap is empty" << endl;
        cout << "Entering new entries in DateMap" << endl;

 }
  
    
  








Related examples in the same category