It all revolves around your operator[] that you overload for your class.
First, if value1 doesn't exist, it has to be added.
Second, return a reference to whatever value1 maps to, so that it can be assigned to.
Do you want to overload two operators in your class? In the code snippet, you seem to have called only one operator[]. The = operator is not your class assignment operator.