If I understand your question right, you want to know how to pass by reference. Parameters to the second function are already being passed by reference. So the answer to your question would be simply:
void insertobjectnames(std::string clsname, std::string objname) {
BitmapHashMap hashmap;
hashmap.Insertnew(clsname, objname);
}
Of course this toy example doesn't make sense as it is, but you haven't told us why you need the first function.