hashprice_menu
1:price_menu[“Dosa”]=60;//insert
2:price_menu[“Dosa”]+=10;//update
3:cout<<price_menu[“Dosa”]<<endl;//search
how 60 is getting stored in row 1.
1:price_menu[“Dosa”]=60;//insert
2:price_menu[“Dosa”]+=10;//update
3:cout<<price_menu[“Dosa”]<<endl;//search
how 60 is getting stored in row 1.
price_menu[“Dosa”]
form this you call operator overloaded function
where first you search whether dosa is present or not
if not first you insert “dosa” and and then return the reference of dosa’s value
whose values is later updated because you have return the reference of value from search function
T* search (string key){
int idx=hashfun(key);
Node<T>*temp=table[idx];
while(temp){
if(temp->key==key)return &temp->value;
temp=temp->next;
}
return NULL;
}
T* operator [](string key){
T* f=search(key);
if(f==NULL){
insert(key,0);
f=search(key);
}
return f;
}
i hope this helps
if yes hit a like and don’t forgot to mark doubt as resolved 
if you have more doubts regarding this feel free to ask
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.