However error messages came up saying than in the reference operator function and pointer operation function 'data' is not a member of the class IdNode.
I declared 'data' in my class Idnode as IdNode data in order to solve the earlier error message. On the other hand, a new error message came out saying field 'data' has incomplete type. Since 'data' is still not part of the class IdNode, the problem with the two operation function still stands.
I don't think you need to put an IdNode inside your class because your class IS the IdNode. Why are you trying to overload the operators? How are you expecting to use them?