Declare const Node* temp in const member functions - that's all. These functions must not modify Node fields but you can modify them via Node* temp pointer.
Yet another remark:
Did you want to implement Linked List class? If so why did you implement Node only class? A list is not a simple Node. Now you are trying to manipulate with list via Node pointers only in C (not C++ ) style. It's an example of a bad class design...
Reputation Points: 1234
Solved Threads: 347
Postaholic
Offline 2,001 posts
since Jul 2008