Looking at the other questions regarding error C2106, I am still lost as to what the issue is with my code. While compiling I get the following errors:
c
the term l-value in c++ means the 'left-value' is of the improper type. Since you are using the assignment operator on it, to be the proper type it must be a value that can be assigned a new value, which means it can not be a constant. Most likely, your call to payroll.at() is returning a constant value instead of a reference to the actual value. Trying to assign a new value to it will then cause an l-value error.