I am trying to create an overloaded assignment operator so I can assign a linked list from RHS to LHS. I can't run my program through the debugger because I get an error in the clone function on the line that says headPtr = new getPointerTo; .
The error says:
Severity Code Description Project File Line Suppression State
Error C2760 syntax error: unexpected token 'identifier', expected 'type specifier'
Maybe I should provide the .h file for "node" and "linkedSet." From those you'll be able to see where headPtr and getPointerTo come from.
The operator = function I got from my textbook but it has a generic clone function with no code. The clone function came from my instructor's online notes. I talked to him about patching these together and he says that I am on the right track. However, I think my problem lies in understanding exactly how the clone function works, and the way I am using headPtr, and getPointerTo. I have not changed any code in the algorithm for clone(); only replaced the area where headPtr and getPointerTo are located since the old names are from a different program.
If you would like any other info please let me know.