Answers for "c++ hash map size"

C++
0

c++ hash map size

// map::size
#include <iostream>
#include <map>

int main ()
{
  std::map<char,int> mymap;
  mymap['a']=101;
  mymap['b']=202;
  mymap['c']=302;

  std::cout << "mymap.size() is " << mymap.size() << '\n';

  return 0;
}
Posted by: Guest on October-08-2021

Browse Popular Code Answers by Language