Mega Code Archive
Categories
/
C++
/
Data Structure
[] automatically inserts elements
#include
#include
using namespace std; int main() { map
mapObject; cout << "Initial size of map: " << mapObject.size() << endl; cout << "The value associated with A is " << mapObject['A']; cout << endl; cout << "Size of map is now: " << mapObject.size() << endl; return 0; }