Dictionary implementation in c++ using linked list