But I am having trouble overloading the stream extraction operator.
Each time I try, I get the following error
Can any of you spot my error? I am new to the concept of overloading operators so I am sure it is probably a 'newbie' mistake.
Description Resource Path Location Type
Symbol 'lName' could not be resolved overload.cpp /overload line 42 Semantic Error
Symbol 'fName' could not be resolved overload.cpp /overload line 40 Semantic Error
Symbol 'lName' could not be resolved overload.cpp /overload line 40 Semantic Error
Symbol 'fName' could not be resolved overload.cpp /overload line 42 Semantic Error
You've defined the operator as being a friend function outside the class, and yet you're trying to use fName and lName in the operator as if it were a class member.