C++/Map Multimap/map empty — различия между версиями
Admin (обсуждение | вклад) м (1 версия: Импорт контента...) |
|
(нет различий)
|
Версия 14:21, 25 мая 2010
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;
}