I have a hash table defined as
typedef std::unordered_map<unsigned long long int,unsigned long long int> table_map;
and in the program I read the contents of the file into the buffer using fread similar to this:
fread(buffer, sizeof(long long int), 1024, file1);
Declare a hash table as
table_map c1;
Now I create a hash table like
for (i = 0; i < 1024; i++)
c1.insert(table_map::value_type(buffer[i], i));
Now my questions, after the for loop, how can I get the size of the hash table?
It has 1024 elements of type unsigned long long int, as well as keys of the same type, but I could not use sizeof(Mymap)either `size of (c1) beacause, just returning the value 32. Is there a way to find this?
Thanks Sunil
source
share