Hi want to implement an unordered hashmap ie. FIFO implementation . Below is the code.Please help me with this.
#include <hash_map>
#include <iostream.h>
int main()
{
hash_map<int,int>testMap;
testMap[1]=1;
testMap[3]=5;
testMap[2]=2;
typedef hash_map<int,int>::iterator hashIter;
for(hashIter it=testMap.begin();it!=testMap.end();it++)
{
cout<<it->second<<"\n";
}
}
It gives output as
1
2
5
But I want
1
5
2
Any suggestions ?